[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-21 Thread Tarn Yeong Ching
Tarn Yeong Ching added the comment: GOD... I see. Thank you very much! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: [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,

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-20 Thread Tarn Yeong Ching
Tarn Yeong Ching added the comment: and more... It doesn't happen when Tree directly subclasses list. -- ___ Python tracker ___ ___

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-20 Thread ctarn
ctarn added the comment: Moreover, 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. I didn't try it using Python 3.9 yet. -- versions: +Python 3.7 -Python 3.9 ___ Python tracker

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-20 Thread ctarn
Change by ctarn : Removed file: https://bugs.python.org/file48797/bug.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-20 Thread ctarn
ctarn added the comment: I tried to remove list(), and just use cmd like `_ = d[0:1]`, and it surprisingly changed d[0].owner from d to d[0:1]! The file attached is updated. I pretty sure that it is a (serious) bug. Please check it more carefully. Thanks. -- title: UserList-subclass