Thomas Wouters wrote:
> 
> On Sat, Mar 15, 2008 at 2:58 PM, Terry Reedy <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     | Also, yielding everything from an iterator:
>     |
>     | >>> def flatten(iterables):
>     | ...     for it in iterables:
>     | ...         yield *it
> 
>     Following the general rule above for *exp, that would be the same as
>     yield
>     tuple(it).
> 
> No. *exp by itself is not valid syntax:

Why isn't it? I'd rather have one meaning for the *-prefix operator with 
a single special case for assignment targets, than have a bunch of 
special cases scattered across the grammar.

Besides, as the SmugLispWeenies have noted, Python is becoming more like 
Lisp all the time:

     (setq obj '(an ex-parrot))  ; (AN EX-PARROT)
     `(I have ,obj)              ; (I HAVE (AN EX-PARROT))
     `(I have ,@obj)             ; (I HAVE AN EX-PARROT)

Why not hasten the transformation? :p

(Only kidding!)

Neil

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to