On Mar 31, 5:03 pm, gigs <[EMAIL PROTECTED]> wrote:
> Raj Bandyopadhyay wrote:
> > Hi
>
> > Here's a simple class example I've defined
>
> > #
> > class myInt(int):
> >def __add__(self,other):
> > return 0
>
> > print 5 + myInt(4) #prints 9
> > print myInt(4)
Raj Bandyopadhyay wrote:
> Hi
>
> Here's a simple class example I've defined
>
> #
> class myInt(int):
>def __add__(self,other):
> return 0
>
> print 5 + myInt(4) #prints 9
> print myInt(4) + 5 #prints 0
> #
>
> The Python bi
Hi
Here's a simple class example I've defined
#
class myInt(int):
def __add__(self,other):
return 0
print 5 + myInt(4) #prints 9
print myInt(4) + 5 #prints 0
#
The Python binary operation function (binary_op1() in
Objects/a