Showing content from http://mail.python.org/pipermail/python-dev/attachments/20170109/aba8b46a/attachment.html below:
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Interesting to see that others have the same problem.</p>
<p>We also had this kind of "over-protective" behavior. As far as I
know, our devs stopped doing it as it feels cumbersome.</p>
<p><br>
</p>
<p>Another argument for this is: when using PyCharm, this IDE will
suggest imports from those modules which aren't the original ones.
So, you might import from a third-party module. Over time,
however, people learn to pick the "right" module to import from.</p>
<p>Cheers,<br>
Sven<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 09.01.2017 12:42, Steve Holden
wrote:<br>
</div>
<blockquote
cite="mid:CAMofdRDZHknZz=PN_NAM2Mc=XPE1MDePc-FtHUdWJxZpR_FKVA@mail.gmail.com"
type="cite">
<div dir="ltr">One of my developers recently submitted a pull
request incuding a number of lines like
<div><br>
</div>
<div>import os as _os</div>
<div><br>
</div>
<div>When I asked him why he suggested a) this would improve
encapsulation, and b) the practice was supported in the
stdlib. Further investigation reveals that some modules (e.g.
argparse, crypt, difflib, random) do use this technique, but
it is far from universal.</div>
<div><br>
</div>
<div>So I thought it would be useful to get input from current
devs about the value of this practice, since to me it seems
somewhat anti-pythonic. What advantages does it confer?</div>
<div><br>
</div>
<div>regards<br clear="all">
<div>
<div class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">Steve Holden<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Python-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-Dev@python.org">Python-Dev@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/options/python-dev/srkunze%40mail.de">https://mail.python.org/mailman/options/python-dev/srkunze%40mail.de</a>
</pre>
</blockquote>
<br>
</body>
</html>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4