I want to have simple class constants in python like this:

class FooBarBaz:
    BAR = 123

    @staticmethod
    def getBar():
        return BAR # this would not work, of course

        return FooBarBaz.BAR # this would work but is "way too long"

Is there a shorter way to reference the class itself from inside a method, not the current instance? It's not only for static methods but in general, like a __class__ keyword or something.

Edit
Report