@ChrisA
You, my friend, certainly put the nail in the coffin!
Sent from my iPhone
> On Aug 5, 2015, at 5:52 AM, Chris Angelico wrote:
>
>> On Wed, Aug 5, 2015 at 7:01 PM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> You can chain 'for' and 'if' clauses as much as you like, and they
>>> beh
On Thu, Aug 6, 2015 at 2:39 PM, Laura Creighton wrote:
> In a message of Wed, 05 Aug 2015 17:05:49 +1000, Chris Angelico writes:
>>Incidentally, why Python 2.6? Python 2.7 has been out for a pretty
>>long time now, and if you can't move to version 3.x, I would at least
>>recommend using 2.7. Since
In a message of Wed, 05 Aug 2015 17:05:49 +1000, Chris Angelico writes:
>Incidentally, why Python 2.6? Python 2.7 has been out for a pretty
>long time now, and if you can't move to version 3.x, I would at least
>recommend using 2.7. Since the release of 2.6.9 back before Frozen
>came out, that bran
Chris Angelico :
> On Wed, Aug 5, 2015 at 7:01 PM, Marko Rauhamaa wrote:
>> Chris Angelico :
>>
>>> You can chain 'for' and 'if' clauses as much as you like, and they
>>> behave exactly the way you'd expect.
>>
>> How do you know what I'd expect?
>>
>> I wouldn't know what to expect myself.
> [.
On Wed, Aug 5, 2015 at 7:01 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> You can chain 'for' and 'if' clauses as much as you like, and they
>> behave exactly the way you'd expect.
>
> How do you know what I'd expect?
>
> I wouldn't know what to expect myself.
A list comprehension can always
Chris Angelico :
> You can chain 'for' and 'if' clauses as much as you like, and they
> behave exactly the way you'd expect.
How do you know what I'd expect?
I wouldn't know what to expect myself.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
Hi Chris, yeah, I have to stick on the software which my employer provides to
me (we're enterprise company). I'm not root on that system. I'm happy with 2.6
now, two years ago we were on older RHEL with python 2.4 and it was a real pain
:)
> > $ cat /etc/redhat-release
> > Red Hat Enterprise Li
On Wed, Aug 5, 2015 at 5:10 PM, Pavel S wrote:
> $ cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 6.5 (Santiago)
> $ python --version
> Python 2.6.6
>
>> Incidentally, why Python 2.6?
>>
I guess that would be why :)
That's probably actually a patched 2.6.6 - from what I unders
On Wed, Aug 5, 2015 at 5:03 PM, Pavel S wrote:
> It seems this is allowed by the grammar:
>
> list_display::= "[" [expression_list | list_comprehension] "]"
> list_comprehension ::= expression list_for
> list_for::= "for" target_list "in" old_expression_list
> [list_iter]
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
$ python --version
Python 2.6.6
> Incidentally, why Python 2.6?
>
> ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Pavel S wrote:
> Hi,
>
> I recently found interesting GOTCHA while doing list comprehension in
> python 2.6:
>
values = ( True, False, 1, 2, 3, None )
[ value for value in values if value if not None ]
> [True, 1, 2, 3]
>
> I was wondering why this list comprehension returns incorrect
On Wed, Aug 5, 2015 at 4:48 PM, Pavel S wrote:
> Hi,
>
> I recently found interesting GOTCHA while doing list comprehension in python
> 2.6:
>
values = ( True, False, 1, 2, 3, None )
[ value for value in values if value if not None ]
> [True, 1, 2, 3]
>
> I was wondering why this list c
It seems this is allowed by the grammar:
list_display::= "[" [expression_list | list_comprehension] "]"
list_comprehension ::= expression list_for
list_for::= "for" target_list "in" old_expression_list [list_iter]
old_expression_list ::= old_expression [("," old_expression
Hi,
I recently found interesting GOTCHA while doing list comprehension in python
2.6:
>>> values = ( True, False, 1, 2, 3, None )
>>> [ value for value in values if value if not None ]
[True, 1, 2, 3]
I was wondering why this list comprehension returns incorrect results and
finally found a typ
14 matches
Mail list logo