A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-February/060844.html below:

[Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notation

[Python-Dev] PEP for adding an sq_index slot so that any object, a or b, can be used in X[a:b] notationJim Jewett jimjjewett at gmail.com
Mon Feb 13 22:16:17 CET 2006
Travis wrote:

>  The patch adds a new API function int PyObject_AsIndex(obj)

How did you decide between int and long?

Why not ssize_t?

Also, if index is being added as a builtin, should the failure
result be changed?  I'm thinking that this may become a
replacement for isinstance(val, (int, long)).  If so, it might
be nice not to raise errors, or at least to raise a more
specific subclass.  (Catching a TypeError and then
checking the message string ... does not seem clean.)

-jJ
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