E. Paine <paineeli...@gmail.com> added the comment:
+1 I agree the current AttributeError is not suitable. I would just copy the code from Lib/tkinter/__init__.py:2524 (or even better: refactor it into its own method to avoid duplication). The code there, though, would raise a similar AttributeError if the default root is disabled, so I suggest that needs a changing to possibly a TypeError (i.e. missing 'master' argument). I assume you are alright to create a PR for this? Please revert the "resolution" field as this is intended to be the reason for issue closure. ---------- nosy: +epaine, serhiy.storchaka title: Variable.__init__ to raise a RuntimeError instead of obscure AttributeError -> Variable.__init__ raises obscure AttributeError versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42630> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com