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 serhiy.storchaka
Recipients alexandre.vassalotti, serhiy.storchaka
Date 2018-10-13.15:36:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539445010.19.0.788709270274.issue34973@psf.upfronthosting.co.za>
In-reply-to
Content
I have two options for solving this result.

1. Add necessary checks for the list case. This will add a bunch of code and will slow down handling all lists because of additional checks.

2. Use the optimization for lists only when there are no other references to it. If no other references, the list can not be changed. This will not add much code, and may even slightly speed up cases for tuples and lists. But the code will be more fragile.

Of course there is an option of removing this optimization at all. But bytes([x]) and bytes((x,)) are common cases.
History
Date User Action Args
2018-10-13 15:36:50serhiy.storchakasetrecipients: + serhiy.storchaka, alexandre.vassalotti
2018-10-13 15:36:50serhiy.storchakasetmessageid: <1539445010.19.0.788709270274.issue34973@psf.upfronthosting.co.za>
2018-10-13 15:36:50serhiy.storchakalinkissue34973 messages
2018-10-13 15:36:50serhiy.storchakacreate