[Python-Dev] Adding Optik to 2.3 standard library (original) (raw)

Alex Martelli aleax@aleax.it
Mon, 15 Apr 2002 09:36:43 +0200


On Monday 15 April 2002 12:18 am, you wrote:

>>>>> "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 :)

Wouldn't the same instance-as-module trick as in, e.g.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65207

let you make a "module-with-getattr" to most intents&purposes?

Alex