Serhiy Storchaka added the comment:

> 0.  It seems that this pushes conversions from python code (app.py, 
> tkinter.py) to C (_tkinter.py).  Correct?  What is being gained from a user 
> viewpoint?

The benefit is that widget.tk.getint(widget.tk.call(...)) (and 
widget.getint(widget.call(...))) always works when it makes sense. Currently it 
works for integers and strings. If the result of Tcl call becomes some specific 
type in new Tcl version, this needs a workaround with converting to str, as you 
can see in IDLE code. User code with this patch will become more robust against 
future Tcl/Tk changes. And actually against changes that already happen in 
recent Tcl versions. Many user code that worked with 8.3 or 8.4 needed an 
update to work with 8.5 or 8.6. With this patch they perhaps need less changes.

> 2. Does the change break existing code?

Usually not.

>  In particular, is the idlelib change necessary or optional?

It is optional. It is is just a demonstration how the code can be made simpler 
and more robust.

> How does this match getint and getdouble being synonyms for builtins?
> -    getint = int
> -    getdouble = float
> Or were 'int' and 'float' overridden before this?

There are different functions on different levels. There are tkapp methods in 
_tkinter.c. There are Misc methods in tkinter.py (added in changesets 
73dd2a979857 and 273451892327). They originally was wrappers around tkapp 
methods. There are module-level functions in tkinter.py. They were converted to 
aliases of int and float in 34cca832a4af.

> 3. Should there be a doc change, at least in docstrings?

Unfortunately all these functions are not documented.

----------

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

Reply via email to