well this was the old way of dong things before decorator
and it’s one example of how it was done before
and should be working but seems it’s not
not certain if it is because of latest changes in python may be!
i’d like to have this ild way of doing thing just as an example
if i cannot add it then i won’t put this as an example because it’s not working
just ind other ways with @classmethod or @staticmethod maybe
by the way what would be this cls thing is this a command to clear ?
did a test and printed the foo and c1 values and got theses values
Old Classmethod
foo = <classmethod object at 0x09D0F9F0> c1 = <class ‘main.C1’>
The first example can not work because there are 2 typos in it.
Well the first one might not be a typo because you probably didn’t understand that @ should only be used in an decorator expression. The second error is in the last argument to print(). a=c1 which makes it, to python, look like you want to pass an undefined variable c1 to a key word argument a, which does not exist.
You should at least read the very usefull tracebacks python gives you.