modernize adapt_like_to_iterable
a lot of time is wasted here duck typing the object's current collection, when this is a fixed value. this is run on every list assignment so this should be fixed up. there is also the notion that if the target collection falls under the category of list or set, the incoming object would be checked only that it is an iterable, that is #3456, however that is a more controversial change.
Comments (4)
-
reporter -
reporter additionally look into getting rid of MappedCollection._convert in its current form; we should take the keys as given and work just like a
__setitem__
operation does, and not spend all the time re-fetching keys from the values. Validation of keys should be only an optional thing that one does with events. -
reporter the dictionary aspect is moved here to #3604.
-
reporter - changed status to resolved
- refactor of adapt_like_to_iterable(), fixes
#3457. Includes removal of adapt_like_to_iterable() as well as _set_iterable(), uses slots for collectionadapter, does much less duck typing of collections.
→ <<cset b606e47ddc54>>
- Log in to comment