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

Skip Montanaro skip at pobox.com
Thu Jan 3 11:02:03 EST 2002


    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".

;-)

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list