<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>