Nick Coghlan added the comment:

As in, for arguments that have __index__() methods, do the conversion to a true 
Python integer eagerly when the slice is built rather than lazily when 
slice.indices() (or the C-level equivalent) is called?

That actually seems like a potentially plausible future approach to me, but 
isn't a change I'd want to make hastily - those values are visible as the 
start, stop and step attributes on the slice, and 
https://docs.python.org/3/reference/datamodel.html#types currently describes 
those as "These attributes can have any type."

Given that folks do a lot of arcane things with the subscript notation, I 
wouldn't want to break working code if we have less intrusive alternatives.

----------

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

Reply via email to