the annoying, verbose self

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Nov 24 05:07:37 EST 2007


On Sat, 24 Nov 2007 01:55:38 -0800, samwyse wrote:

> I've had the same thought, along with another.  You see, on of my pet
> peeves about all OO languages that that when creating new code, I
> generally begin by writing something like this:
> 
> cat = 'felix'
> dog = 'rover'
> def example():
>   global cat, dog  # not always required, but frequently needed
>   return ', '.join((cat, dog))

Ouch that's bad design IMHO.  The need to use ``global`` is a design
smell, if needed *frequently* it starts to stink.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list