Re: special method in module

2005-11-16 Thread Jan Procházka
Thanks, probably you are right, hacking python in my situation is not neccessary... >Jan Procházka wrote: > > > >>can have modules special methods? >> >> > >no, but you can replace the module object with something that can have >special methods: &

special method in module

2005-11-16 Thread Jan Procházka
Hello, can have modules special methods? althouht i think that no, i tried following example and i don't, why it don't works: file m2.py (imported module) class Module: def __getitem__(self,index): return index module=Module() __getitem__=module.__getitem