No Python 2.0 (was Re: idiom for initial list of lists)

Tim Peters tim_one at email.msn.com
Sat Sep 9 14:46:16 EDT 2000


[Dan Schmidt]
> Or in Python 2.0,
>
>  S = [[] for x in range(5)]

[Aahz (Copyright 2000 by aahz at pobox.com)]
> I'm calling once again for everyone to please refrain from giving
> Python 2.0 answers to questions unless the questioner specifically
> mentions Python 2.0.  IMO, it unnecessarily complicates things,
> because most people asking questions need to use a shipping version
> of Python.

Well, you can call for that, but I don't think anyone will play along.
c.l.py isn't just a free all-the-help-you-can-eat buffet, it's a forum for
the language as a whole.  Sneaking in examples of new possibilities is an
honorable form of education.  Someone baffled by 2 years of 20Kb-per-msg
debates over list comprehensions sees a 1-line example that solves a problem
they're actually facing, and-- aha! --"I didn't know it could actually be
*useful*!" <0.7 wink>.

And there's no other way that I know of to get that connection across to
people at the exact fleeting moment they're open to it.  So long as it's
clearly marked "Or in Python 2.0", better those determined not to learn
anything new learn to ignore stuff so marked.

this-msg-brought-to-you-by-AUGMENTED-ASSIGNMENTS-new-New-**!!NEW!!**-
    in-2.0b1-ly y'rs  += tim






More information about the Python-list mailing list