title: Is it a good idea to using class as a namespace in Python
body: <p>I am putting a bunch of related stuff into a class. The main purpose is to organize them into a namespace.</p>
  
  <pre><code>class Direction:
  
    north = 0
    east = 1
    south = 2
    west = 3
  
    @staticmethod
    def turn_right(d):
      return turn_to_the_right
  
    @staticmethod
    def turn_left(d):
      return turn_to_the_left
  
  
  
  # defined a short alias because direction will be used a lot
  D = Direction
  
  d0 = D.north
  d1 = D.turn_right(d)
  </code></pre>
  
  <p>There is not much object concept involved. In C++, I will be using the actual language keyword <code>namespace</code>. There is no such thing in Python. So I am trying to use <code>class</code> for this purpose.</p>
  
  <p>Is this a good idea? Any pitfall with this approach?</p>
  
  <p>I've just answer a related question yesterday. This question is asked in a different way. It is an actual decision I need to make for myself.</p>
  
  <p>Static method vs module function in python - Stack Overflow</p>
  
  <p><a href="https://stackoverflow.com/questions/3570823/static-method-vs-module-function-in-python/3571114#3571114">Static method vs module function in python</a></p>