On Sun, May 21, 2006 at 17:38:49 CEST, Guido van Rossum wrote
> ...
> Also, it would be a parsing conflict for the new conditional
> expressions (x if T else y).
> ...
That's all I needed to know.
Sorry, everyone, I'll try not to waste your time in the future.
___
On Mon, May 19, 2008 at 5:33 AM, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
...
import this
> The Zen of Python, by Tim Peters
> ...
> There should be one-- and preferably only one --obvious way to do it.
>
> There should be ONE OBVIOUS way to do it, not "only one way".
The "only one way"
Ryan Hitchman wrote:
This would make the syntax closer to that of generators, which have
'for variable in iterable if condition',
Incorporating the filter condition into the list comprehension syntax
(and later into generator expressions) is necessary because they need to
be written as a sin
On Mon, 19 May 2008 08:42:29 pm Lennart Regebro wrote:
> How was it again? "One and only one way"? :-)
Certainly not. What on earth gave you the idea that that ridiculous
statement is a Python philosophy? I know some Perl developers like to
contrast the supposed flexibility of Perl ("more than
On Mon, May 19, 2008 at 5:55 AM, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> "Ryan Hitchman" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | I'd like to propose an addition to the for statement's syntax:
> |
> | for {variable} in {iterable} if {condition}:
> |{block}
> |
> | wh
"Ryan Hitchman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| I'd like to propose an addition to the for statement's syntax:
|
| for {variable} in {iterable} if {condition}:
|{block}
|
| which is equivalent to
|
| for {variable} in {iterable}:
|if not {condition}:
|
On Sun, 18 May 2008, Ryan Hitchman wrote:
I'd like to propose an addition to the for statement's syntax:
for {variable} in {iterable} if {condition}:
{block}
which is equivalent to
for {variable} in {iterable}:
if not {condition}:
continue
{block}
and
for {variable} in filte
First, the best list on which to discuss this would be Python-Ideas not
Python-Dev.
Second, this was brought up there a few months ago, although not much
discussion ensued:
http://mail.python.org/pipermail/python-ideas/2008-March/001407.html
- Eli
On Sun, May 18, 2008 at 9:45 PM, Ryan Hitchman
I'd like to propose an addition to the for statement's syntax:
for {variable} in {iterable} if {condition}:
{block}
which is equivalent to
for {variable} in {iterable}:
if not {condition}:
continue
{block}
and
for {variable} in filter(lambda: {condition}, iterable):
{bl