<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div><div dir="ltr">Addendum (copyleft, re-use and modify at will)<div style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline" class="gmail_default"> + related links</div><br><div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small"><div style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline" class="gmail_default">[The]</div> "where's Waldo" exercise and this investigation into the MRO may be combined: bury a waldo() instance or class method somewhere in the Genesis family <div style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline" class="gmail_default">[tree],</div></div></div></div></div></blockquote><div><br></div><div>===</div><div><br></div><div>class Gen0 (object):<br> """the Old One"""<br><br> def __init__(self):<br> print("__init__ of {}".format("Gen0"))<br><br>class Adam(Gen0):<br> """one of two in Gen1"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Adam"))<br> <br>class Eve(Gen0):<br> """one of two in Gen1"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Eve"))<br><br> def waldo(self):<br> print("Waldo in {}".format("Eve")) <br><br>class Cain(Adam, Eve):<br> """Gen2"""<br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Cain"))<br><br><br>class Abel(Adam, Eve):<br> """Gen2"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Abel"))<br><br><br>class Seth(Adam, Eve):<br> """Gen2"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Seth"))<br><br>class Azura(Adam, Eve):<br> """Gen2"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Azura"))<br><br>class Enosh(Seth, Azura):<br> """Gen3"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Enosh"))<br><br>class Kenan(Enosh):<br> """Gen4"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Kenan"))<br><br>class Mahalaleel(Kenan):<br> """Gen5"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Mahalaleel"))<br><br>class Jared(Mahalaleel):<br> """Gen6"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Jared"))<br><br>class Enoch(Jared):<br> """Gen7"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Enoch"))<br><br>class Methusela(Enoch):<br> """Gen8"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Methusela"))<br><br> def waldo(self):<br> print("Waldo in {}".format("Methusela")) <br><br>class Elisha(Enoch):<br> """Gen8"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Elisha"))<br><br><br>class Lamech(Methusela):<br> """Gen9"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Lamech"))<br><br>class Ashmua(Elisha):<br> """Gen9"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Ashmua"))<br><br> def waldo(self):<br> print("Waldo in {}".format("Ashuma")) <br> <br><br>class Noah(Lamech, Ashmua):<br> """Gen10"""<br><br> def __init__(self):<br> super().__init__()<br> print("__init__ of {}".format("Noah"))<br><br><br>if __name__ == "__main__":<br> import inspect<br> subject = Noah()<br> subject.waldo()<br> print(inspect.getmro(subject.__class__))<br> <br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">===</div><br></div><div dir="ltr"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default">Related posts:</div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><a href="https://grokbase.com/t/python/edu-sig/066kd86zh1/rich-data-structures-plus-knowledge-domain-object-sets">https://grokbase.com/t/python/edu-sig/066kd86zh1/rich-data-structures-plus-knowledge-domain-object-sets</a><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><a href="https://mail.python.org/pipermail/edu-sig/2012-December/010709.html">https://mail.python.org/pipermail/edu-sig/2012-December/010709.html</a> </div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small" class="gmail_default"><br></div></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div></div></div></div></div></div>