Pythonification of the asterisk-based collection packing/unpacking syntax

Eelco hoogendoorn.eelco at gmail.com
Sat Dec 24 09:45:01 EST 2011


On Dec 20, 6:47 am, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Mon, 19 Dec 2011 19:35:20 -0800, alex23 wrote:
> > Eelco <hoogendoorn.ee... at gmail.com> wrote:
> >> Having two seperate symbols seperated by whitespace, as in @list args
> >> strikes me as a terrible break of normal python lexical rules.
>
> > You mean like 'is not'? And the upcoming 'yield from'?
>
> Also "not in".
>
> Space-delimited tokens are hardly rare in Python, e.g.:
>
> import module as name
> for x in sequence
> if flag
> elif condition
> while condition
> with obj
> del name
>
> Nevertheless, I think the suggested syntax "@list args" is awful.
>
> --
> Steven

Can you give an example of a construct in python where two whitespace
delimited identifiers are legal?



More information about the Python-list mailing list