removing list comprehensions in Python 3.0

Bengt Richter bokr at oz.net
Sat Jul 9 02:24:12 EDT 2005


On Fri, 08 Jul 2005 22:29:30 -0600, Steven Bethard <steven.bethard at gmail.com> wrote:

>Dennis Lee Bieber wrote:
>> On Fri, 08 Jul 2005 16:07:50 -0600, Steven Bethard
>> <steven.bethard at gmail.com> declaimed the following in comp.lang.python:
>> 
>>>I only searched a few relatively recent threads in c.l.py, so there are 
>>>probably more, but it looks to me like the final decision will have to 
>>>be made by a pronouncement from Guido.
>> 
>> 	Great... It takes me two releases of Python to get comfortable
>> with them, and then they are threatened to be removed again...
>> 
>> 	Might as well submit the language to ISO for standardization --
>> then I wouldn't be following an erratic target <G>
>
>Two points:
>
>(1) There's no reason to get uncomfortable even if they're removed. 
>You'd just replace [] with list().

So list(1, 2, 3) will be the same as [1, 2, 3] ??

Right now,
 >>> list(1,2,3)
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 TypeError: list() takes at most 1 argument (3 given)

have fun ;-)

>
>(2) *IMPORTANT* If this happens *at all*, it won't happen until Python 
>3.0, which is probably at least 5 years away.  And the Python 2.X branch 
>will still be available then, so if you don't like Python 3.0, you don't 
>have to use it.
>
>STeVe

Regards,
Bengt Richter



More information about the Python-list mailing list