Re: Newbie Question - Overloading ==
- From: xkenneth <xkenneth@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 13:45:23 -0700 (PDT)
On Mar 31, 3:42 pm, Amit Gupta <emaila...@xxxxxxxxx> wrote:
On Mar 31, 11:00 am, xkenneth <xkenn...@xxxxxxxxx> wrote:
Yeah, this is what I'm talking about:
def __eq__(self, other) :
try :
return <>
except AttributeError:
return False
That seems a bit nasty to me.
One thing about python (IMO); you can't just say this doesn't look
good. You need to say: why do you think this is not good.
To me, it appears a concise and local solution to your problem.
Yes it is, but it's also tedious and lengthy for should-be simple
statements.
.
- References:
- Newbie Question - Overloading ==
- From: xkenneth
- Re: Newbie Question - Overloading ==
- From: Amit Gupta
- Re: Newbie Question - Overloading ==
- From: xkenneth
- Re: Newbie Question - Overloading ==
- From: Amit Gupta
- Newbie Question - Overloading ==
- Prev by Date: Re: Newbie Question - Overloading ==
- Next by Date: Re: python scripts to standalone executable
- Previous by thread: Re: Newbie Question - Overloading ==
- Next by thread: Re: Newbie Question - Overloading ==
- Index(es):
Relevant Pages
|