From: Barry A. Warsaw <barry@zope.com> > > >>>>> "GvR" == Guido van Rossum <guido@python.org> writes: > > GvR> To the contrary. Only problem is how to prevent loading all > GvR> of optik when one imports getopt.getopt (and getopt.error). > > Too bad modules can't have __getattr__'s :) > > Seriously, I wonder if it's time to write (or adopt) a general > autoloading facility for Python? > Seriously, what do you mean by that? I imagine ugly things <wink>. Btw, Jython (as you might now) has deep-auto-importing, that means import pkg1.pkg2 pkg1.pkg2.f() in Jython can be written as: import pkg1 pkg1.pkg2.f() (yes you should still import the first-level package), this was intended for Java imports but then extended to python packages too for symmetry. OTOH is a great way to write non-portable (to CPython) jython code <wink>. regards.
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