Ask Your Question

Revision history [back]

Since factory is marked as a @classmethod, the first argument is the class, APIRouter. So, "return cls()" is effectively the same thing as "return APIRouter()".

http://docs.python.org/library/functions.html#classmethod

http://stackoverflow.com/questions/38238/what-are-class-methods-in-python-for