On Oct 27, 3:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Sat, 25 Oct 2008 23:44:46 -0200, Benjamin <[EMAIL PROTECTED]>
> escribió:
>
> > On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> >> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> >> dicts of Python 3.
En Sat, 25 Oct 2008 23:44:46 -0200, Benjamin <[EMAIL PROTECTED]>
escribió:
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
I'd like to know why Python 2.6 doesn't have the syntax to create sets/
dicts of Python 3.0, like:
Because nobody bothered to backport them.
En Sat, 25 Oct 2008 23:47:32
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport it.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.org/m
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport it.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.org/m
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport them.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.or
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport them.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.org
Sorry for the answering delay, Google Groups is slow today.
Steven D'Aprano:
>Personally, I don't see the advantage of set and dict comprehensions. I think
>the value of them is very marginal, not worth the additional syntax.<
If it's worth in 3.0 then it's worth in 2.6 too. If it isn't worth i
[EMAIL PROTECTED] writes:
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
I've always just used:
set(x*x for x in xrange(10))
dict((x,x*x) for x in xrange(10))
I didn't even realize that you could write sets with {...}.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 25 Oct 2008 09:07:35 +, Steven D'Aprano wrote:
> On Sat, 25 Oct 2008 01:13:08 -0700, bearophileHUGS wrote:
>
>> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
>> dicts of Python 3.0, like:
>>
>> {x*x for x in xrange(10)}
>> {x:x*x for x in xrange(10)}
>
> Ma
On Sat, 25 Oct 2008 01:13:08 -0700, bearophileHUGS wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
Maybe nobody asked for it?
Personally, I don't see the advantage of set an
10 matches
Mail list logo