[Python-Dev] Re: [Patches] [Patch #101175] Fix slight bug in the Ref manual docs on listcomprehensions

Greg Ewing greg@cosc.canterbury.ac.nz
Wed, 16 Aug 2000 15:04:33 +1200 (NZST)


Tim Peters:

> Because Guido hates it.  It's almost certainly an error on the part
> of the user

Guido doesn't like it, therefore it must be an error. Great
piece of logic there.

> Catching likely errors is a benefit for the user.

What evidence is there that this particular "likely error" is
going to be prevalent enough to justify outlawing a potentially
useful construct? Where are the hoardes of Haskell user falling
into this trap and clamouring for it to be disallowed?

> really the same reason that zip() without arguments raises an
> exception.

No, I don't think it's the same reason. It's not clear what
zip() without arguments should return. There's no such difficulty
in this case.

For the most part, Python is free of artificial restrictions, and I
like it that way. Imposing a restriction of this sort seems
un-Pythonic.

This is the second gratuitous change that's been made to my
LC syntax without any apparent debate. While I acknowledge the
right of the BDFL to do this, I'm starting to feel a bit
left out...

> I realize that Haskell does allow it -- although that would be a
> surprise to most Haskell users

Which suggests that they don't trip over this feature very
often, otherwise they'd soon find out about it!

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+