A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106984.html below:

[Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

[Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.pyAntoine Pitrou solipsis at pitrou.net
Thu Dec 23 22:28:44 CET 2010
On Thu, 23 Dec 2010 22:09:15 +0100
Éric Araujo <merwok at netwok.org> wrote:
> Le 23/12/2010 20:55, Antoine Pitrou a écrit :
> >>      def __index__(self):
> >> -        """index(self)"""
> >> +        """someobject[self]"""
> > 
> > This is misleading as to what the method actually does,
> Really?  Unless I misunderstood the docs, __index__ is used when the
> object is used as an index (or with bin or oct, but I didn’t want to
> complicate the docstring, just fix it).

Well, it's only used for converting to an integer (also, it's used in
more cases than just indexing), so "someobject[self]" is not the actual
operation.

Regards

Antoine.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4