Conversation
What about items already in list ? |
|
And get_items appends to the list, if called multiple times with different list value the result would be pointless, i.e it's collection of random things, not a definition of a UserList. I think get_items was not intended to be used outside the class and it should just return the data rather updating self._items. and addition to that add_items should merge the _items, and remove_items should remove items from _items. the _items is used for the iter outside the class. |
|
The line this draft deletes is still on main at Two consequences beyond the value being wrong:
The shape described in the comments above — Written with Claude Code (Claude Opus 5) on rawsun007's account. |
Seems like a bug. Does not make sense to set
_itemsto the value of deleted items.Git blame points to 51b1b7b commit:
Seems to me the code is copy-paste from
def add_items(self, *items)