[issue38649] tkinter messagebox is sloppy
New submission from David Lambert : Does aksokcancel return "true" or True ? The docstring should say True This is pervasive throughout the module. tkinter has such a mishmash of numbers supplied as strings, strings supplied as constants making this carelessness egregious. On the topic of constants, the messagebox module redefines OK. You might argue that the definition didn't change. I suspect this issue applies to all versions of tkinter or Tkinter having the messagebox. # types ABORTRETRYIGNORE = "abortretryignore" OK = "ok" ... # replies ... OK = "ok" def askokcancel(title=None, message=None, **options): "Ask if operation should proceed; return true if the answer is ok" s = _show(title, message, QUESTION, OKCANCEL, **options) return s == OK -- assignee: docs@python components: Documentation messages: 355729 nosy: David Lambert, docs@python priority: normal severity: normal status: open title: tkinter messagebox is sloppy type: enhancement versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue38649> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44519] help(math.fabs)
New submission from David Lambert : math.fabs returns float. The documentation should say so, and help(math.fabs) should include the expected return type -> float fabs(x, /) -> float Return the absolute value of the float x. I did not check, but expect these annotations recommendations are pervasive throughout the python libraries. -- assignee: docs@python components: Documentation messages: 396582 nosy: David Lambert, docs@python priority: normal severity: normal status: open title: help(math.fabs) type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue44519> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44519] help(math.fabs)
David Lambert added the comment: Hi Ray, I'm glad this was a conscious choice. I found a person confused by the output of print(abs(3), math.fabs(3)) Perhaps the manual would mention return values->that's not an annotation. Thanks for considering, Dave On 6/27/21 12:42 PM, Raymond Hettinger wrote: > Raymond Hettinger added the comment: > > Thanks for the suggestion but we've not adopted type annotations in the > documentation. > > -- > nosy: +rhettinger > resolution: -> rejected > stage: -> resolved > status: open -> closed > > ___ > Python tracker > <https://bugs.python.org/issue44519> > ___ -- ___ Python tracker <https://bugs.python.org/issue44519> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38649] tkinter messagebox is sloppy
David Lambert added the comment: Sometimes I say nice things about python. https://www.quora.com/Is-Python-fast-yet/answer/David-Lambert-86?__nsrc__=4&__snid3__=6376944631 On 10/31/19 1:14 PM, Brett Cannon wrote: > Brett Cannon added the comment: > > Please note that calling something "sloppy" and that somehow its development > was done in some "carelessness" fashion to the point of being "egregious" is > not motivating to others to try and help. Trying to support all of this code > for free in one's spare time is not easy, so I would ask you try to be more > understanding and nicer in your comments. > > -- > nosy: +brett.cannon > > ___ > Python tracker > <https://bugs.python.org/issue38649> > ___ -- ___ Python tracker <https://bugs.python.org/issue38649> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com