Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

The optimization for constant indexes is handy for things like b'A'[0]. I do 
not know cases for constant slices of constant strings.

Even if there are cases, we need to prove that they are common enough. The 
compiler does not perform all possible constant foldings, it does it only to 
support common cases like 24*60*60 or 2**32-1.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to