python3: 'where' keyword

Alex Martelli aleaxit at yahoo.com
Sun Jan 9 12:01:47 CET 2005


AdSR <adsr at poczta.onet.pl> wrote:

> I don't know haskell, but it looks SQL-ish to me (only by loose 

Indeed, the fact that many MANY more people are familiar with SQL than
with Haskell may be the strongest practical objection to this choice of
syntax sugar; the WHERE clause in an SQL SELECT has such wildly
different semantics from Haskell's "where" that it might engender huge
amounts of confusion.  I.e., reasoning by analogy with SQL only, one
might reasonably expect that minor syntax variations on:

    print a, b where a = b

could mean roughly the same as "if a==b: print a, b", rather than
roughly the same as:

    a = b
    print a, b

I wonder if 'with', which GvR is already on record as wanting to
introduce in 3.0, might not be overloaded instead.


Alex



More information about the Python-list mailing list