Re: [Bug #115845] sre: maxsplit as keyword argument

http://sourceforge.net/bugs/?func=detailbug&bug_id=115845&group_id=5470
is this really a bug? should users expect to be able to use keyword arguments anywhere? </F>

Unclear, but the names were documented, and it worked before (when pattern objects were Python instances) -- so who knows how much code there's lying around that assumes this. Well, we know it's more than zero, because the bug report came from soemone who ran into this. :-) Can we at PythonLabs help by adding keyword arguments to all of the _sre.c functions? I presume it's a pretty straightforward change. --Guido van Rossum (home page: http://www.python.org/~guido/)

Can we at PythonLabs help by adding keyword arguments to all of the _sre.c functions? I presume it's a pretty straightforward change.
if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there. </F>

Fredrik Lundh writes:
if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there.
This is documented in the Extending & Embedding manual. The parser module (Modules/parsermodule.c) uses this. -Fred -- Fred L. Drake, Jr. <fdrake at beopen.com> BeOpen PythonLabs Team Member

if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there.
Grep the Modules directory for PyArg_ParseTupleAndKeywords. It's used in the mmap, parser, pyexpat and sha modules. --Guido van Rossum (home page: http://www.python.org/~guido/)

Unclear, but the names were documented, and it worked before (when pattern objects were Python instances) -- so who knows how much code there's lying around that assumes this. Well, we know it's more than zero, because the bug report came from soemone who ran into this. :-) Can we at PythonLabs help by adding keyword arguments to all of the _sre.c functions? I presume it's a pretty straightforward change. --Guido van Rossum (home page: http://www.python.org/~guido/)

Can we at PythonLabs help by adding keyword arguments to all of the _sre.c functions? I presume it's a pretty straightforward change.
if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there. </F>

Fredrik Lundh writes:
if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there.
This is documented in the Extending & Embedding manual. The parser module (Modules/parsermodule.c) uses this. -Fred -- Fred L. Drake, Jr. <fdrake at beopen.com> BeOpen PythonLabs Team Member

if anyone can post (or point me to) an example showing how to use the keyword API, I can take if from there.
Grep the Modules directory for PyArg_ParseTupleAndKeywords. It's used in the mmap, parser, pyexpat and sha modules. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (3)
-
Fred L. Drake, Jr.
-
Fredrik Lundh
-
Guido van Rossum