3 ms·
Pythonic way to solve this problem would be to make Bar() a component of another class. Functions are not a good tool for storing stateful objects in Python. T
by wheelerof4te 5y ago
Pythonic way to solve this problem would be to make Bar() a component of another class.
Functions are not a good tool for storing stateful objects in Python. That's why classes exist.