Lazy Python usage (hack request)
June Kim
junaftnoon at nospamplzyahoo.com
Sat Dec 30 14:55:48 EST 2000
More information about the Python-list mailing list
Sat Dec 30 14:55:48 EST 2000
- Previous message (by thread): Lazy Python usage (hack request)
- Next message (by thread): Lazy Python usage (hack request)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Aahz Maruch" <aahz at panix.com> wrote : [snip] > > Well, if you're going to stick to it not being an option to make any > changes, the answer is "no". However, you can make a little hack that > *does* work: > > >>> from lazy import lazy > >>> a = lazy.b > No name 'b' defined, using default 777 > >>> print a > 777 > > Inside lazy.py, you define a class called lazy with a __getitem__() > method. Shouldn't the method be __getattr__() instead? Best regards, June
- Previous message (by thread): Lazy Python usage (hack request)
- Next message (by thread): Lazy Python usage (hack request)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list