On Fri, 05 Jan 2001 15:14:41 -0500, Guido van Rossum <guido@python.org> wrote: > Please have a look at this SF patch: > > http://sourceforge.net/patch/?func=detailpatch&patch_id=102808&group_id=5470 > > This implements control over which names defined in a module are > externally visible: if there's a variable __exports__ in the module, > it is a list of identifiers, and any access from outside the module to > names not in the list is disallowed. This affects access using the > getattr and setattr protocols (which raise AttributeError for > disallowed names), as well as "from M import v" (which raises > ImportError). Ummmmm.....why do we want this? What's wrong with the current suggestion of using "_"? __exports__ feels somehow wrong to me. None of the rest of Python has any access control, and I really like that. A big -1 from me, for what it's worth. > I like it. I'm surprised. Why do you like that? > This has been asked for many times. So has adding curly-braces as control structure, with all due respect. -- Moshe Zadka <sig@zadka.site.co.il> This is a signature anti-virus. Please stop the spread of signature viruses!
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