namespaces
Paolino
paolo_veronelli at tiscali.it
Tue Aug 9 10:03:07 EDT 2005
Why descriptor mechanism doesn't apply to modules?
I suspect another anomaly in the namespaces implementations.
class Mosse(object):
def __get__(self,*_):
print 'HERE'
m=Mosse()
m # doesn't work
import new
mod=new.module('hopeless')
mod.m=Mosse()
assert 'm' in mod.__dict__ # this is said to be the key for descriptors
# to be called
mod.m # doesn't work
Thanks Paolino
___________________________________
Yahoo! Messenger: chiamate gratuite in tutto il mondo
http://it.beta.messenger.yahoo.com
More information about the Python-list
mailing list