Avatar ·

How to make a static property of the class in Python?

📁 Advanced Python Topics, Error

I try this:

   class   ChatCodes :  _Chat =  'CHT'    @property    def   retu  self._chat    

if I use this:

   Print  (ChatCodes.chat +  'ANY_STR' )  

then an error appears:

unsupported operand type(s) for +: 'property' and 'str'

How to create a static property?