On 7 dic, 11:33, "iwl" <[EMAIL PROTECTED]> wrote: > What I found out up to now is to create a class inherited from an > fitting type > and overwrite the __setitem__ and __getitem__ method but haven't test > this > yet, something like that: > > class test(int): > __setitem(self, value)__: C-Set-Func(value) > __getitem(self)__: return C-Get-Func() > > x=test() > x= -> C-Set-Func called > y=x -> C-Get-Func called
Python doesn't work that way: http://effbot.org/zone/python-objects.htm -- http://mail.python.org/mailman/listinfo/python-list