I want to create class instance inside itself. I tried to it by this way:
class matrix: (...) def det(self): (...) m = self(sz-1, sz-1) (...) (...)
but I got error:
m = self(sz-1, sz-1)
AttributeError: matrix instance has no
So, I tried to do it by this way:
class matrix: (...) def det(self): (...) m = matrix(sz-1, sz-1) (...) (...)
and I got another error:
m = matrix(sz-1, sz-1)
NameError: global name 'matrix' is not defined
Of course matrix is not global class. I have no idea how to solve this problem.
Refering to the class itself from within a class mehod in Objective C
How do I dereference a hash that's been returned from a method of a class?
m = self.__class__(sz-1, sz-1)
jquery change == to contains?
m = type(self)(sz-1, sz-1)
C# : Mini Application Structural Design (Classes/Interfaces/etc.)