This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abarnert
Recipients abarnert, abarry, curioswati, rhettinger
Date 2015-12-15.07:15:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450163747.01.0.286887316888.issue25864@psf.upfronthosting.co.za>
In-reply-to
Content
> It seems no more interesting or problematic than sequence argument unpacking working with dictionaries, "a, b = {'one': 1, 'two': 2}".

Dictionaries (including dicts, dict subclasses, and custom Mappings) are iterables. People use that fact every time they write `for key in d`. So it's not at all problematic that they work with iterable unpacking. Especially since here, custom Mappings work exactly the same way as dicts, dict subclasses, custom Sets, iterators, and every other kind of iterable.

Dictionaries are not sequences. People never write code expecting them to be. So it is problematic that they work with sequence reversing. Especially since here, custom Mappings do _not_ work the same way as dicts, dict subclasses, custom Sets, iterators, and other non-sequences, all of which raise a TypeError.
History
Date User Action Args
2015-12-15 07:15:47abarnertsetrecipients: + abarnert, rhettinger, abarry, curioswati
2015-12-15 07:15:47abarnertsetmessageid: <1450163747.01.0.286887316888.issue25864@psf.upfronthosting.co.za>
2015-12-15 07:15:46abarnertlinkissue25864 messages
2015-12-15 07:15:46abarnertcreate