Home  >  Q&A  >  body text

Python的Mixin有语法约束吗?还是就是巧妙的运用了多重继承来实现的?

PHP中文网PHP中文网2765 days ago385

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 16:44:01

    Python does not have a (ruby-like) mixin syntax. Like SocketServer.ThreadingMixIn This is actually multiple inheritance, and there are also some tricks based on decorators. These methods are based on Python's relatively free rewriting capabilities.

    reply
    0
  • Cancelreply