S
sergeiiv65
Want to work so:
import sys
class Foo(object):
def __getattr__(self, t):
print 'use __getattr__ - ', t
return type(t, (object,), {})
def funct1(self): pass
def funct2(self): pass
sys.modules[__name__] = Foo()
ttt('yy')
name 'ttt' is not defined.
__getattr__ not work (((.
import sys
class Foo(object):
def __getattr__(self, t):
print 'use __getattr__ - ', t
return type(t, (object,), {})
def funct1(self): pass
def funct2(self): pass
sys.modules[__name__] = Foo()
ttt('yy')
name 'ttt' is not defined.
__getattr__ not work (((.