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 methane
Recipients Dan Rose, brett.cannon, mark.dickinson, methane, miss-islington, serhiy.storchaka, terry.reedy, tim.peters, vstinner
Date 2018-11-28.03:13:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I agree that modifying tuple is bad idea in general case.

But in case of constants, in-place modify is the easiest approach.

Our purpose is "merging" constant.  On the other hand, "build new tuple and
replace old tuple" approach makes two same constant tuples.
If old tuple is referenced from somewhere, we fail to "merging".

So I don't think we need to follow the general principle unless it reduces code.

FYI, we have similar in-place editing for interning already.
Date User Action Args
2018-11-28 03:14:00methanesetrecipients: + methane, tim.peters, brett.cannon, terry.reedy, mark.dickinson, vstinner, serhiy.storchaka, miss-islington, Dan Rose
2018-11-28 03:14:00methanesetmessageid: <>
2018-11-28 03:14:00methanelinkissue34100 messages
2018-11-28 03:13:59methanecreate