[issue22214] Tkinter: Don't stringify callbacks arguments
Terry J. Reedy
report at bugs.python.org
Mon Aug 18 04:25:50 CEST 2014
Terry J. Reedy added the comment:
I think I requested elsewhere that public _tkinter/tkinter names be documented. What you wrote already seems clear enough.
"Default mode is still wantobjects=1," The patch appears to change it to 2 in tkinter/__init__.py.
"/* Create argument list (argv1, ..., argvN) */
if (!(arg ..."
/arg/args/ is definitely less confusing. Add /list/tuple/ to old and new functions.
One thing slightly puzzles me: the current PythonCmd is used in a call to Tcl_CreateCommand. (Since the latter is not in _tkinter, I presume it is 'imported' in one of the includes.) The new PythonObjCmd is passed to Tcl_CreateObjCommand. Does that already exist, just waiting for us to add PythonObjCmd?
I near as I can tell, the only differences between PythonCmd and PythonOjbCmd are /argv/objv/ and the following.
PyObject *s = unicodeFromTclString(argv[i + 1]);
PyObject *s = FromObj(data->self, objv[i + 1]);
I think I would make the name substitution either in both or neither. It would be nice to reuse the rest of the code.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22214>
_______________________________________
More information about the Python-bugs-list
mailing list