E
Evan Simpson
In Python 2.4 the following works:
.... def __getitem__(self, k):
.... return 'K' + k
....
....while in Python 2.3 it fails with NameError: name 'x' is not defined.
Is this an "accidental feature", or can I count on this working in
future versions of Python? For that matter, is there a way to do this
(intercept global variable accesses) in Python 2.3?
Cheers,
Evan @ 4-am
.... def __getitem__(self, k):
.... return 'K' + k
....
....while in Python 2.3 it fails with NameError: name 'x' is not defined.
Is this an "accidental feature", or can I count on this working in
future versions of Python? For that matter, is there a way to do this
(intercept global variable accesses) in Python 2.3?
Cheers,
Evan @ 4-am