[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-04-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-04-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset dedf481ec2be by Serhiy Storchaka in branch '2.7': Issue #15133: _tkinter.tkapp.getboolean() now supports long and Tcl_Obj and https://hg.python.org/cpython/rev/dedf481ec2be New changeset 117f45749359 by Serhiy Storchaka in branch '3.4': Issue #15133

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are your thoughts about the patch Terry? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2015-03-19 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2014-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. 1) getboolean() and BooleanVar.get() now always return bool. Wrapping the result of getboolean() into bool() is not more needed. 2) getboolean() and BooleanVar.get() now works with Tcl_Obj. This makes Tkinter more robust against future Tcl/

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2014-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have no strong opinion. Definitely getboolean() (and other getXXX) is not consistent. The question is what should getboolean (and BooleanVar.get) always return, bool or int? Note that since 8.6 Tcl doesn't use special boolean type internally and use intege

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2014-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, what do you think is the proper disposition of this issue *now*? -- nosy: +serhiy.storchaka versions: -Python 3.2, Python 3.3 ___ Python tracker __

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-11-08 Thread Zachary Ware
Zachary Ware added the comment: I don't think 2.7 and 3.3 were meant to be removed from this one and we're now in 3.4 time. -- nosy: +zach.ware versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-07-26 Thread Christian Rickert
Christian Rickert added the comment: Noticed this odd behaviour with BooleanVar.get() as well: class MyCheckbutton(Checkbutton): def __init__(self, parent, **options): Checkbutton.__init__(self, parent, **options) self.var = BooleanVar() s

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-07-22 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-25 Thread klappnase
klappnase added the comment: "...you could not pass the return value of getboolean() any longer to BooleanVar.get() which would be really bad." Ooops, typo, should be BooleanVar.set() of course. -- ___ Python tracker

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-25 Thread klappnase
klappnase added the comment: I agree that get() should better return a boolean in any case, however the bug then is not one of BooleanVar but rather one of tk.getboolean(). I did some experimenting with get() and it seems that there are three possibilities: getboolean() returns True/False as

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Mark Summerfield
Mark Summerfield added the comment: How about a compromise? Deprecate (but keep BooleanVar) and add BoolVar with proper True/False behavior to match the other *Vars? -- ___ Python tracker

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark: "Variable.get(self) returns self._tk.globalgetvar(self._name). String/Int/Double/Var call str/int/float as appropriate." was meant to say that String/Int/Double/Var.get(self) already call str/int/float on the result of self._tk.globalgetvar(self._name)

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread klappnase
klappnase added the comment: The behavior of Tkinter when handling boolean values appears to be a bit erratic at times, not only BooleanVar.get() returns 0/1 instead of True/False (e.g. see the thread at tkinter-discuss: http://mail.python.org/pipermail/tkinter-discuss/2012-June/003176.html )

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Mark Summerfield
Mark Summerfield added the comment: Oh, and I forgot to say that I think StringVar.set(x) should do str(x) and StringVar.get() should return a str. -- ___ Python tracker ___ __

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-24 Thread Mark Summerfield
Mark Summerfield added the comment: I think that BooleanVar.set(x) should do bool(x) on its argument (and raise an exception if this isn't valid) and BooleanVar.get() should return a bool. Similarly I think that IntVar.set(x) should do int(x) and IntVar.get() should return an int, and that Do

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Just that, which I used to verify with 2.7.3 and 3.3.0a4 in Win7 and do some more experiments: bv.set/get happily accept *and return* 2, -1, bv.set(2.2) 'works' bv.get() then raises TypeError: must be str, not float This will annoy you ;-) bv.set('1'); bv.get

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-23 Thread Mark Summerfield
Mark Summerfield added the comment: Did you mean formal test code? Or just an example like this: from tkinter import * tk = Tk() bv = BooleanVar() print(bv.get(), type(bv.get())) bv.set(True) print(bv.get(), type(bv.get())) bv.set(False) print(bv.get(), type(bv.get())) ### output ### 0 1 0

[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree

2012-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: The bug is the mismatch between doc and behavior. Unless someone can explain why the seemingly reasonable docstring is wrong, I would consider changing the behavior a possible fix. Can you add minimal test code that gives you an int? I should check windows an