I'm enjoying Python 3.5 type hints support, but facing a special concern.
I'm trying to specify the type of a constructor parameter, which should be the class itself (i.e. a self-referential relation). Here is my example:
class Section(object):
def __init__(self, path: str, parent: Section):
pass
Python complains with a
NameError: name 'Section' is not defined
Is there a way to fix this?