Message 208877 - Python tracker

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.

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.