[python]如何复制一个 class

通过下面两种方法可以复制一个 class:

  • class B(A): pass
  • B = type("B", (A,), {})

参考资料


Comments

comments powered by Disqus