This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients larry, nadeem.vawda, serhiy.storchaka, vajrasky
Date 2014-01-23.03:25:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390447555.29.0.339868893083.issue20185@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks, Serhiy, for the pointer. Now, I am able to convert the method using _PyEval_SliceIndex function.

Sorry, Larry. I used optional groups in __init__ because I didn't know about unspecified.

Here is the updated patch for listobject. One thought, for list.index method, I use this:

stop: slice_index(c_default="Py_SIZE(self)") = unspecified

Then the signature will be:

"index(value, [start=0, [stop=unspecified]])\n"

Somehow I prefer more explanatory signature:

"index(value, [start=0, [stop=size of list]])\n"

Anyway, this is a trivial thing.
History
Date User Action Args
2014-01-23 03:25:55vajraskysetrecipients: + vajrasky, larry, nadeem.vawda, serhiy.storchaka
2014-01-23 03:25:55vajraskysetmessageid: <1390447555.29.0.339868893083.issue20185@psf.upfronthosting.co.za>
2014-01-23 03:25:55vajraskylinkissue20185 messages
2014-01-23 03:25:54vajraskycreate