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 mark.dickinson
Recipients ctarn, eric.snow, mark.dickinson, steven.daprano, terry.reedy
Date 2019-12-21.11:55:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576929333.21.0.923981259038.issue39110@roundup.psfhosted.org>
In-reply-to
Content
[ctarn]

> it works as expected with Python 3.6 (the owner of each of them is d), and Python 3.8 and Python 3.7 work differently

The change in behaviour is the result of a bug fix that was applied in 3.7 and upwards: see GH-13169 and #27639.

As Eric says, UserList is behaving as intended here. Your problem stems from a design flaw in your code, namely that Nodes have owners. If a node exists both in a Tree *and* in a slice of that Tree (which slice, since the #27639 fix, is again a Tree), that node can't have both the original Tree *and* the slice as owner. In this case, what's happening is that accessing `d[0:1]` creates a new Tree object, and the __init__ method for that Tree object then reassigns the "owner" of the node in that slice.

> I don’t know what is discussion list

See https://www.python.org/community/lists/, and particularly https://mail.python.org/mailman/listinfo/python-list

Closing again here, but feel free to start a discussion or ask questions on the list above.
History
Date User Action Args
2019-12-21 11:55:33mark.dickinsonsetrecipients: + mark.dickinson, terry.reedy, steven.daprano, eric.snow, ctarn
2019-12-21 11:55:33mark.dickinsonsetmessageid: <1576929333.21.0.923981259038.issue39110@roundup.psfhosted.org>
2019-12-21 11:55:33mark.dickinsonlinkissue39110 messages
2019-12-21 11:55:32mark.dickinsoncreate