Message240196
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka |
| Date |
2015年04月07日.08:41:02 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1428396064.01.0.00215215635093.issue23880@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|