Classes are not stored in their own namespace. They are stored in the namespace they are defined in; in your case, that's the global namespace of the interpreter session.
Methods within classes can still refer to names in that same namespace.
Perhaps you were confused with the scope at class definition time. The class body is executed as if it is a function; the local namespace of that function then forms the attributes of the resulting class. You can still reach names from outer scopes from there, however:
foo = 'bar'
class Spam(object):
baz = foo # works, foo can be referenced
def ham(self):
xyz = foo # works, foo is a global and can be referenced
xyz = baz # does **not** work, baz is part of the class now.
xyz = self.baz or Spam.baz # these do work