subsetting and .NET (was Re: Python and Ruby: a comparison)

Alex Martelli aleax at aleax.it
Thu Jan 3 11:11:27 EST 2002


"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.1010073787.6869.python-list at python.org...
>
>     Alex> E.g., consider:
>
>     Alex> A) "I don't ever write 'x+=23' -- I grew up with 'x = x + 23'
and that's
>     Alex> good enough for me"
>
>     Alex> B) "I don't ever write 'd.setdefault(key, def)' -- I grew up
with
>     Alex> 'if not d.has_key(key): d[key] = def' and that's good enough for
me"
>
>     Alex> C) "I don't ever write '[x for x in l if isok(x)]' -- I grew up
with
>     Alex> 'filter(isok, l)' and that's good enough for me"
>
>     Alex> (and so on, and so forth).
>
> You forgot:
>
>     D) "I don't ever write 'print >> sys.stderr, "divide by zero!"' -- I
>        grew up with 'sys.stderr.write("divide by zero!\n")' and that's
good
>        enough for me".

Yep, you CAN change the latter part of each of these assertions into
"because
this specific newfangled addition is an abomination in the eye of all
right-thinking people":-).  Personally, I'd only do it for [D], of course.


Alex






More information about the Python-list mailing list