On 27 November 2017 at 06:40, Chris Angelico <ros...@gmail.com> wrote:
> Here are a few syntaxes that I believe have been proposed at various > times: > > x, y = islice(iter, 2) # status quo > x, y = iter # your proposal > x, y, = iter # omit last destination > Just to clear the list, this one (trailing comma) would be ambiguous/backward incompatible for the 1 variable case: x, = iter which is a relatively common idiom and is expected to raise an error if the iterator has trailing elements. -- Daniel F. Moisset - UK Country Manager - Machinalis Limited www.machinalis.co.uk <http://www.machinalis.com> Skype: @dmoisset T: + 44 7398 827139 1 Fore St, London, EC2Y 9DT Machinalis Limited is a company registered in England and Wales. Registered number: 10574987.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/