Maybe the title is a little screwed up but is there a way to make an instance of a class inside the same class in Python?
Something like this:
class Foo:
foo = Foo()
I know that the interpreter says that Foo is not declared but is there a way to achieve this?
Update:
This is what I'm trying to do:
class NPByteRange (Structure):
_fields_ = [ ('offset', int32),
('lenght', uint32),
('next', POINTER(NPByteRange)) ]