Pybites<p>New article:</p><p>⚠️Why you should avoid import * in Python 🐍<br /><a href="https://pybit.es/articles/why-you-should-avoid-import-in-python/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">pybit.es/articles/why-you-shou</span><span class="invisible">ld-avoid-import-in-python/</span></a></p><p>Covering:<br />- Why modules are great and namespacing explained<br />- Why import * is a problem<br />- A practical example where a function gets overriden<br />- The recommended way to do imports<br />- What PEP8 has to say about this<br />- Protection workaround, use __all__ to define your module's public interface</p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pythonprogramming" class="mention hashtag" rel="tag">#<span>pythonprogramming</span></a> <a href="https://fosstodon.org/tags/modules" class="mention hashtag" rel="tag">#<span>modules</span></a> <a href="https://fosstodon.org/tags/encapsulation" class="mention hashtag" rel="tag">#<span>encapsulation</span></a> <a href="https://fosstodon.org/tags/namespacing" class="mention hashtag" rel="tag">#<span>namespacing</span></a> <a href="https://fosstodon.org/tags/zenofpython" class="mention hashtag" rel="tag">#<span>zenofpython</span></a> <a href="https://fosstodon.org/tags/bestpractices" class="mention hashtag" rel="tag">#<span>bestpractices</span></a> <a href="https://fosstodon.org/tags/pitfalls" class="mention hashtag" rel="tag">#<span>pitfalls</span></a> <a href="https://fosstodon.org/tags/imports" class="mention hashtag" rel="tag">#<span>imports</span></a> <a href="https://fosstodon.org/tags/dundermethods" class="mention hashtag" rel="tag">#<span>dundermethods</span></a></p>