[Python-ideas] Dunder method to make object str-like

Chris Barker chris.barker at noaa.gov
Thu Apr 7 15:00:53 EDT 2016


On Thu, Apr 7, 2016 at 11:59 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> __index__ was originally created to support indexing, but has morphed over
> time to mean "something that can be losslessly converted to an integer".
>

Ahh! very good precedent, then -- where else is this used?

-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160407/7cc2e20d/attachment.html>


More information about the Python-ideas mailing list