Embedded python adding variables linking to C++-Variables / callbacks

gagsl-py at yahoo.com.ar gagsl-py at yahoo.com.ar
Thu Dec 7 15:54:16 EST 2006


On 7 dic, 11:33, "iwl" <Ingo.W... at gmx.de> 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




More information about the Python-list mailing list