Message240196
getint, getdouble and getboolean were thin wrappers around Tcl functions that converted string result of Tcl call to specified Python type. Since 2.3 _tkinter can return not only string, but int, float, etc and Tcl_Obj (if wantobject is True). getXXX methods was updated to work with respective automatically converted types (getint with int, etc), but they don't work with general Tcl_Obj, so can't be applied to the result of _tkinter call in general case. As a workaround you should use int(str(value)) or like.
Support of Tcl_Obj in getbool was added in issue15133. Proposed patch adds support of Tcl_Obj in getint and getdouble and int in getdouble. It also restores the use of getint and getdouble in Tkinter. |
|
Date |
User |
Action |
Args |
2015-04-07 08:41:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2015-04-07 08:41:04 | serhiy.storchaka | set | messageid: <1428396064.01.0.00215215635093.issue23880@psf.upfronthosting.co.za> |
2015-04-07 08:41:03 | serhiy.storchaka | link | issue23880 messages |
2015-04-07 08:41:03 | serhiy.storchaka | create | |
|