Demystifying Python's Method Resolution Order

  • Python basic and Application
  • 2016-08-13 (Sat) 16:40 - 17:20
  • English
  • 101
  • Photography and recording is allowed

Slide

https://slides.com/aktech/python-mro

Video

https://youtu.be/cuonAMJjHow

Description

Brief Background: It all started with a post by Samuele Pedroni to the Python development mailing list on 1 Oct 2002. In his post, Samuele showed that the Python 2.2 method resolution order is not monotonic and he proposed to replace it with the C3 method resolution order. Guido agreed with his arguments and therefore now Python 2.3 uses C3.

Hence, Python uses two algorithms for method resolution order. The Old MRO algorithm is very straight forward but the new one is not so easy to bring out. I will be discussing and explaining both the algorithm and I would also be talking a a bit about the background of this change and the benefits of new C3 Method Resolution Order.

Comments

blog comments powered by Disqus

Sponsors

Keystone

Diamond

Platinum

Gold

Startup

Silver

Media