I’m curious if the following is valid, where only some of the variables are type-declared in a type-declared class. That is, would cdef
before the class be invalid in this case?
cdef class CythonClass:
cdef int var1, var2
def __init__(self, a, b):
self.var1 = a
self.var2 = b
self.defaultdict = DefaultDict(DefaultDict([]))