what the code "return cls()" meaning
Asked by
Oliver Huang
I am a newcomer of openstack and python. When I read the code in file nova-2011.
I found these lines
class APIRouter(
"""
Routes requests on the OpenStack API to the appropriate controller
and method.
"""
@classmethod
def factory(cls, global_config, **local_config):
"""Simple paste factory, :class:
return cls()
My question is: what the code "return cls()" means in the factory() class method? where to find the factory() method body?
Please help me, thx.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Oliver Huang for more information if necessary.
To post a message you must log in.