On Jan 7, 1:29 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > You are too late, any and all are built-in into python 2.5 > > > Hi, excellent. Now how about something more generic, possibly: > > > [ x.y() for x or _next_ in c ] > > > where the context of _next_ is limited in complexity, and/or can only > > occur in a generator? > > Would you care to explain what that syntax supposedly means ? By > _next_ you mean something like the next method in generators ? _next_ > executes if x is false ? so whatever _next_ returns is named as x, so > you can call x.y() ? I really didn't get your new syntax inside that > list comprehension, neither its uses. >
The idea is a shorthand for reduce. Here, _next_ meant the next item in the iterable c. -- http://mail.python.org/mailman/listinfo/python-list