Newbie Question - Overloading ==
Amit Gupta
emailamit at gmail.com
Mon Mar 31 16:42:36 EDT 2008
On Mar 31, 11:00 am, xkenneth <xkenn... at gmail.com> 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.
More information about the Python-list
mailing list