Jan Erik Moström wrote at 2023-9-3 18:10 +0200: >I'm looking for some advice for how to write this in a clean way > ... >The "problem" is that I've currently written some code that works but it uses >global variables ... and I don't like global variables. I assume there is a >better way to write this, but how?
You could define a class with a `__call__` method and use an instance of the class as replacement. The class and/or instance can provide all relevant information via attributes. -- https://mail.python.org/mailman/listinfo/python-list