[issue26148] String literals are not interned if in a tuple

2016-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is provided in issue27942. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Default value identity regression ___ Python tracker

[issue26148] String literals are not interned if in a tuple

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: FYI fatoptimizer has a more efficient algorithm to merge constants: http://fatoptimizer.readthedocs.org/en/latest/optimizations.html#comparison-with-the-peephole-optimizer It looks like it interns strings which are part of tuples. To be honest, I don't understa

[issue26148] String literals are not interned if in a tuple

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26148] String literals are not interned if in a tuple

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26148] String literals are not interned if in a tuple

2016-01-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Usually string literals are interned. But not if they are a part of constant tuple. >>> def abc(): pass ... >>> x = 'abc' >>> x is abc.__name__ True >>> x = ('abc',) >>> x[0] is abc.__name__ False This makes effect on namedtuples (issue25981). May make ef