title: Calling a class method in class attribute
body: <p>I want to make a class that contains collection of colored signs, and I want it to be like a static variable. But I can't call @classmethod from the class attribute, i.e. the following gives me error (<code>NameError: name 'Pegs' is not defined</code>):</p>
  
  <pre><code>class Color:
      RED = '\033[31m'
  
  class Pegs:
      PEG = '\u25A0'
      PEGS = {
          'red' : Pegs.generate_peg_from_color(Color.RED)
      }
  
      @classmethod
      def generate_peg_from_color(cls, color):
          return ''.join([color, Pegs.PEG])
  </code></pre>
  
  <p>Is it possible to call a function in a class attribute? Should I use static method decorator instead of class method? And why does it generates this error?</p>