How can I convert this Python class to Pyrex? class Test(object): something = 123 def hello(self): print Test.something Simply adding cdef before the class keyword doesn't work. Thoughts?