What is a common use of a classmethod in Python?
Correct answer
D. Alternative constructors
6 views
D. Alternative constructors
6 views
Methods like dict.fromkeys are classmethods that build instances.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is D? Ask here and get an explanation.