Dunder method for passing multiple class variables?

Viewed 10

Does python have a build in method, like a dunder method, to set multiple class variables at once. Similar to this:

class Test:
    test1: int = None
    test2: int = None

    @classmethod
    def _set_multiple_class_variables(cls, test1, test2):
        Test.test1 = test1
        Test.test2 = test2

But preferably scalable

0 Answers
Related