[issue39110] UserList-subclass Tree slicing changes node attribute
ctarn
report at bugs.python.org
Fri Dec 20 23:54:51 EST 2019
ctarn <i at ctarn.io> added the comment:
Sorry but it is not. See the first time I print ls[4].owner. We get d as expected, not a slice of d, that is, d[0:2].
However the next time we print it after _ = list(d[0:1]), noticed that ls[4] == d[0:1], we get d[0:1], it’s extremely surprising!!!
I have to highlight it: we just print *.owner before and after `_ = list(d[0:1])`, and the results are different!!!
The latest 3 lines show more strange results.
By the way, it’s my first time to report bug, and I don’t know what is discussion list, and reopened the issue. Thank you.
----------
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39110>
_______________________________________
More information about the Python-bugs-list
mailing list