In the following situations: 

class Data(object):
    @staticmethod
    @property
    def imagesTotal():
        return 10

print(Data.imagesTotal)


The "print(Data.imagesTotal)" can't print "10", it print "<property object at 
0x...>".

It might be a good idea to use "@staticproperty" to solve this problem.
"@staticproperty" is a decorators, it mix the @staticmethod and @property.
Then the static property has getter and setter.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/DEC3AA2NN5KTI5LQ6M7FIRLPDYLNSP7G/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to