aoi.leslie <aoi.les...@gmail.com> added the comment:

Setting the config has no problem. Only reading has.

The config is read from Tk at line 1270 by code

            res = self.tk.call('grid',
                       command, self._w, index)

. If each of the four options (minsize, pad, uniform, and weight) has been set 
to value 1, |res|'s value after the tk call would be a tuple |('-minsize', 1, 
'-pad', 1, '-uniform', '1', '-weight', 1)|. This explains why |uniform|'s value 
does not cause problem, because it is a str, while the other three's are int. 
Also int 0 does not cause problem because it is handled at line 1277 by code

                if not value:
                    value = None

so the resulting option value appears as None in rowconfigure or 
columnconfigure's resulting dict.

In my speculation, the bug is that, when converting from the tuple returned by 
tk call into the resulting dict to be returned by rowconfigure or 
columnconfigure, the converting code assumes that the option values in the 
tuple returned by tk call are all str. But somehow only |uniform|'s value is 
str, while other three's are int.

----------

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

Reply via email to