This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients BreamoreBoy, gpolo, serhiy.storchaka, terry.reedy
Date 2013-11-03.02:01:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383444093.51.0.13702428995.issue6160@psf.upfronthosting.co.za>
In-reply-to
Content
The bbox fix and the return change are unrelated issues. Let us separate them.

There are bbox methods for Grid, Canvax, Listbox, Text, and Spinbox. All are documented as returning tuples of (4) ints, though there are two different interpretations. The first 4 end with
  return self._getints(self.tk.call(...)) or None

Spinbox.bbox should be fixed in all versions to do the same. (The current patch leave off 'or None'. I am not sure if it is ever 'triggered', but let's be consistent.)  The new test looks good. I thought of checking that they are all non-negative, but that would really be a tk test and would not catch tk being off by 1, which I think is more likely than tk completely blundering by returning a negative int.

Grepping tkinter.__init__.py for 'an empty string' gives multiple hits that indicate to me (without detailed examination) that there are about 7 methods that return such. This is slightly odd in a Python context, but it is documented, hence not wrong. It does not seem to cause a problem; hence it should only be changed in the future after a deprecation period. (At least, I would not do so without pydev discussion, even though no sane code I can think of other than a complete test should depend on the return.) Moreover, no deprecation warning would be possible. So I would reject the idea unless someone wants to open a new issue and examine all such returns for possible change in Python 4.

Anyway, I removed '' returns from the title to make this issue just about Spinbox.bbox. With the patch (and news item) limited to bbox and its test and 'or None' added, I think this would be ready to push.
History
Date User Action Args
2013-11-03 02:01:33terry.reedysetrecipients: + terry.reedy, gpolo, BreamoreBoy, serhiy.storchaka
2013-11-03 02:01:33terry.reedysetmessageid: <1383444093.51.0.13702428995.issue6160@psf.upfronthosting.co.za>
2013-11-03 02:01:33terry.reedylinkissue6160 messages
2013-11-03 02:01:31terry.reedycreate