On Wed, Oct 22, 2003 at 09:11:37AM -0700, Alex Martelli wrote: ... > Alternatively, assigning to an attribute of some particular > object still feels a better approach to me -- no new kwd, > no stretching of bad old ones, actually a chance to let bad > old 'global' fade slowly into the sunset. If there's any > chance to salvage THAT approach -- if it only needs a good > neat syntax to get that "particular object" -- I'll be glad > to participate in brainstorming to find it. How about using the word 'global' to get the current module object? A precedent for this is None which is on its way to becoming a keyword to get that "particular object". A bit of parser magic would be required so global can still work as a declaration for compatibility. >>> global is sys.modules[__name__] True >>> global.__dict__ is globals() True Oren
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