Guido van Rossum <gu...@python.org> added the comment:
I've only seen it in test cases too -- that's one of the very few situations where it makes sense to define a class inside a function. (Creating a class is an expensive operation, so any function that expects to be called more than once is better off moving the class out of the function.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41872> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com