Trouble when overloading operator[ ]
manolop at my-deja.com
manolop at my-deja.com
Thu Jul 20 10:23:42 EDT 2000
Hi!
I need to overload the [ ] operator in a class, so that I can do things
like my_class[2][3]
Everything works fine when I only use one [ ] and the correct values
are passed to __getitem__, but I run into trouble when I add the second
[ ]. Should I use __getitem__ for the double[ ] or is there another
method? O:-)
TIA
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list