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/2013-July/127326.html below:

[Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

[Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores [Python-Dev] Tweaking PEP 8 guidelines for use of leading underscoresBarry Warsaw barry at python.org
Mon Jul 15 21:51:31 CEST 2013
On Jul 14, 2013, at 06:11 PM, Nick Coghlan wrote:

>Private interfaces

PEP 8 does say:

    _single_leading_underscore: weak "internal use" indicator. E.g. from M
    import * does not import objects whose name starts with an underscore.

I'm in favor of making this a stronger recommendation, but I have a small
semantic quibble.  Instead of "private interface" it should be "non-public
interface".  The two aren't quite the same thing; for example, often
single-leading underscores are used for methods that subclasses are supposed
to override, e.g. akin to "protected" in C++.

Besides, Python doesn't really have any strong notion of privateness, so
saying "non-public" means "just because you can, doesn't mean you should".

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