[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

Ronald Oussoren report at bugs.python.org
Thu Feb 3 02:37:23 EST 2022


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

Categories make it possible to add methods to an existing class, but not new attributes.  The latter shouldn't be a problem in principle for an NSApplication subclass because only a single instance of the application class will get created and you may as well use global variables for those.

In some sense categories are syntactic sugar for monkey patching existing classes, commonly used to add convenience methods to Cocoa classes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46573>
_______________________________________


More information about the Python-bugs-list mailing list