Conflicting needs for __init__ method

Ben Finney bignose+hates-spam at benfinney.id.au
Mon Jan 15 22:48:40 EST 2007


"Steven D'Aprano" <steve at REMOVEME.cybersource.com.au> writes:

> On Tue, 16 Jan 2007 08:54:09 +1100, Ben Finney wrote:
> >         def __add__(self, other):
> >             result = perform_addition(self, other)
> >             return result
>
> But that could just as easily be written as:
>
>     def __add__(self, other):
>         return perform_addition(self, other)

Yes. I was merely suggesting that there would probably be more steps
involved than "return some_simple_expression", without actually
detailing those steps.

-- 
 \     "Having sex with Rachel is like going to a concert. She yells a |
  `\      lot, and throws frisbees around the room; and when she wants |
_o__)                     more, she lights a match."  -- Steven Wright |
Ben Finney




More information about the Python-list mailing list