A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-January/147129.html below:

[Python-Dev] Imports with underscores

[Python-Dev] Imports with underscores [Python-Dev] Imports with underscoresSteve Holden steve at holdenweb.com
Mon Jan 9 06:42:33 EST 2017
One of my developers recently submitted a pull request incuding a number of
lines like

import os as _os

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.

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?

regards
Steve Holden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170109/6fff6f50/attachment.html>
More information about the Python-Dev mailing list

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