Guido van Rossum wrote: > I still don't see the use case for late binding of module attributes. The PyObjC project (the Python <-> Obective-C bridge) has/had a problem which might have been solved with lazy module attributes: one module can export a *lot* of ObjC classes, and building the Python wrappers takes quite a bit of time (at runtime), so much much it was quite noticable in the startup time, which especially hurt small apps. At some point I even suggested to insert an object with a __getattr__ method into sys.modules(*), but in the end some other optimizations were done to make importing somewhat quicker. *) I was pleasantly surprised how seamless that actually works: as long as the object either has an __all__ or a __dict__ attribute everything seems to work just fine. So if you *really* want lazy attributes, you can get them... Just
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