Re: [Python-Dev] boxing and unboxing data types

2015年3月08日 21:24:24 -0700

On Mar 8, 2015 9:13 PM, "Steven D'Aprano" <[email protected]> wrote:
>
> There's no built-in way of calling __index__ that I know of (no
> equivalent to int(obj)),
There's operator.index(obj), at least.
> but slicing at the very least will call it,
> e.g. seq[a:] will call type(a).__index__.
-n
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to