Rotwang <sg...@hotmail.co.uk> writes:

> On 11/02/2011 05:42, Ben Finney wrote:
> > What part is inelegant to your eye?
>
> I guess the fact that it exploits the way Python evaluates default
> function arguments to achieve something other than what they were
> intended for.

I see. If that seems like an exploit, I can see why you think it's
inelegant.

> Still, I see that Chris suggested the same solution (thanks, Chris) so
> it clearly isn't something that's frowned upon.

Indeed, in this forum we go to tedious lengths to explain that this
behaviour is the case in Python, so code that depends on it may even be
encouraged :-)

-- 
 \      “He that loveth father or mother more than me is not worthy of |
  `\        me: and he that loveth son or daughter more than me is not |
_o__)                worthy of me.” —Jesus, as quoted in Matthew 10:37 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to