This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients barry, berker.peksag, eryksun, ethan.furman, jayvdb, leewz, martin.panter, ncoghlan, r.david.murray, rhettinger, zach.ware
Date 2017-01-10.06:20:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484029218.77.0.502500915511.issue26632@psf.upfronthosting.co.za>
In-reply-to
Content
Chiming in so Barry & Zach can take this feedback into account for any future proposal:

- I think the specific term "public" has too much baggage from other languages, especially in the sense that it implies that "private" is the default. In reality, all attributes in Python are public, with __all__ serving as executable documentation and a constraint on wildcard exports

- the notion of an automatically supplied __all__ object that defaults to reporting [name for name in dir(module) if not name.startswith("_")] has a lot more to recommend it (as it encodes the default wildcard export behaviour directly into the language implementation, rather than requiring that module analysis tools implement that default themselves)

- given "__all__" as the base name, the method name for class and function registration could just be the generic "__all__.register" (although "__all__.export" would also work, since it's the counterpart of "import *")

- using an object namespace would allow for other registration methods if that seemed appropriate

Even then, I'm at best +0 on the proposal, but I also don't make heavy use of code development helpers (IDEs, etc)
History
Date User Action Args
2017-01-10 06:20:18ncoghlansetrecipients: + ncoghlan, barry, rhettinger, r.david.murray, ethan.furman, berker.peksag, martin.panter, zach.ware, eryksun, leewz, jayvdb
2017-01-10 06:20:18ncoghlansetmessageid: <1484029218.77.0.502500915511.issue26632@psf.upfronthosting.co.za>
2017-01-10 06:20:18ncoghlanlinkissue26632 messages
2017-01-10 06:20:17ncoghlancreate