Python Interview Questions

Category: /knowledge /development
Tags: development

Fundamentals

OOD

  • Q: What’s difference between classmethod and staticmethod? A: classmethod has ‘cls’ variable, by which we can change the state of class attributes. Usually it is used for factory generation. A static method cannot change class state.

评论

提示

  • 如果看不到评论部分, 请暂时关掉adblock in Firefox/Chrome
  • 本网站使用Javascript实现评论功能, 此处外链对提高您的网站PR没有帮助. (潜台词: 请不要灌水, 谢谢)