Thomas Wouters wrote:
> On Fri, Feb 17, 2006 at 05:29:32PM +0100, Armin Rigo wrote:
>
>>> Where obj must be either an int or a long or another object that has
>>> the
>>> __index__ special method (but not self).
>
>
>>The "anything but not self" rule is not consistent with any other
On Fri, Feb 17, 2006 at 05:29:32PM +0100, Armin Rigo wrote:
> >Where obj must be either an int or a long or another object that has
> > the
> >__index__ special method (but not self).
> The "anything but not self" rule is not consistent with any other
> special method's behavior.
Hi Travis,
On Tue, Feb 14, 2006 at 08:41:19PM -0700, Travis E. Oliphant wrote:
> 2) The __index__ special method will have the signature
>
>def __index__(self):
>return obj
>
>Where obj must be either an int or a long or another object that has
> the
>
Georg Brandl wrote:
> Bernhard Herzog wrote:
>> "Travis E. Oliphant" <[EMAIL PROTECTED]> writes:
>>
>>> 2) The __index__ special method will have the signature
>>>
>>>def __index__(self):
>>>return obj
>>>
>>>Where obj must be either an int or a long or anoth
"Travis E. Oliphant" <[EMAIL PROTECTED]> writes:
> 2) The __index__ special method will have the signature
>
>def __index__(self):
>return obj
>
>Where obj must be either an int or a long or another object
>that has the __index__ special method (but
Bernhard Herzog wrote:
> "Travis E. Oliphant" <[EMAIL PROTECTED]> writes:
>
>> 2) The __index__ special method will have the signature
>>
>>def __index__(self):
>>return obj
>>
>>Where obj must be either an int or a long or another object
>>that has
Travis E. Oliphant wrote:
> 3) A new C-API function PyNumber_Index will be added with signature
>
>Py_ssize_t PyNumber_index (PyObject *obj)
>
There's a typo in the function name here. Other than that, the PEP looks
pretty much fine to me.
About the only other quibble is that it co
After some revisions, PEP 357 is ready for more comments. Please voice
any concerns.
-Travis
PEP: 357
Title: Allowing Any Object to be Used for Slicing
Version: $Revision: 42367 $
Last Modified: $Date: 2006-02-14 18:12:07 -0700 (Tue, 14 Feb 2006) $
Author: Travis Oliphant <[EMAIL PROTECTED]>
St