Vajrasky Kok added the comment:

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.

----------
Added file: http://bugs.python.org/file33641/clinic_listobject_v2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20185>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to