Issue with new-style classes and operators
Jan Decaluwe
jan at jandecaluwe.com
Mon Nov 25 07:52:22 EST 2002
"Jan D. Wegner" wrote:
>
> Jan Decaluwe schrieb:
> > Hi:
> >
> > I'm confused by the following behavior of new-style classes
> > and operators:
> >
> > class MyInt(object):
>
> try: classMyInt(int):
>
> or MyInt isn't considered int(eger)
>
I am not trying to subclass integers - this is
just a small example for convenience.
The point is that I think that if __add__ works,
then '+' should do the same.
Regards, Jan
--
Jan Decaluwe
mailto:jan at jandecaluwe.com
More information about the Python-list
mailing list