On 04/08/2014 12:50 PM, Chris Angelico wrote:
It would be nice to have a simple notation that fetches what it needs
and ignores any extras.

a, b, c, * = x.split("-")

Bomb if there aren't two hyphens in x, but if there are more, just
take the first three and ignore the rest. Would work with infinite
iterators quite happily.

http://legacy.python.org/dev/peps/pep-0448/


//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to