Hello, I used http://python-history.blogspot.com/2010/06/method-resolution-order.html and https://www.python.org/download/releases/2.3/mro/ as the reference, but it doesn't explain MRO in the following example (python3.4): ~~~~ class User: def __str__(self): return "User.__str__" def append(self, a): print("User", a) class C(list, User): pass t = C([1, 2, 3]) print(t) t.append(10) print(t) print(t[-1]) ~~~~ The output is: ===== User.__str__ User.__str__ 10 ===== From the output, "User" class as expected does not override list.append(), but does override list.__str__(). Is this behavior documented somewhere (complete arrangement)? What's the rationale behind it? I need this info to implement MRO in an alternative Python implementation (MicroPython). Thanks, Paul mailto:pmiscml at gmail.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4