The top Google hits on SO for python 2 super are a bad mix of the obsolete, irrelevant and non-generalizable, from Python 2.5.2 to 2.7.x, along with known duplicates (but for some reason the canonical targets don't show up in the list). How can we merge/ close/ retitle/ delete/ hammer some rational organization into these search results? (Any debate that Google search ranking is not ultimately our problem is offtopic. Let's just take whatever basic actions we can to make the best of this list, including deletion where warranted. There are really only about six ways to get super()
wrong in 2.x)
- "Why is super() broken in Python-2.x?" [closed as non-constructive] (2011, 38.5K views, 31 upvotes, 14 stars, 6 answers). I just edited the title to "Is ... broken?" Probably got a lot of views due to the controversial title, even though it was closed in 2012. Should it be retitled again to "When and how do I correctly use super() in Python-2.x?"? or probably just deleted since it's wrong, unconstructive and causes needless confusion?
- "super in python 2.7" (2016, 7K views, 2 answers, promptly closed as dupe of Python super __init__ inheritance). I retitled the latter "Python 2.x super __init__ inheritance doesn't work when parent doesn't inherit from object"
- How to use super() with arguments in Python 2.7? (2016, 1 upvote, 0 stars, 1K views, 3 answers, is still not closed as a dupe but should have been)
- Understanding Python super() with __init__() methods 2009, 1901 upvotes, 671 stars, 10 answers, closed 2015 as dupe of What does 'super' do in Python?, although the @AaronHall answer is much better than the accepted 2008(!) answer; please upvote it. However the question needs retitling; the wording is problematic because it disagrees with the much more general title; the question body only asks the very specific "Why use super() in single-inheritance cases instead of directly hard-coding a reference to the ParentClass?"
- python - Example using 'super' In Python2.7 2015, 1.8K views closed as dupe of Python super() raises TypeError. Answer: in Python 2.x, new-style classes must inherit from
object
- A Better Way to Call the Super Constructor in Python 2.7 2017, 2 upvotes, 0 stars, 500 views, 2 answers. I just retitled to "In Python 2.7, isn't it better to call the Super Constructor via
super(self.__class__, self)
…?" - Python 2.7 inheritance super() method invocation 2016, 0 upvotes, 0 stars, 200 views, 2 answers: The positional and keyword arguments for super() must appear in its signature, and also that signature must be consistent between subclass/parent-class.
- Python super __init__ inheritance 2014, 21 upvotes, 4 stars, 43K views, 3 answers. This and 5. should be duplicates
- python - How to call super method? 2015, 27 upvotes, 2 stars, 41K views, 5 answers. Retitled "How to call super method from grandchild class?". Seems rare
- tkinter - Python 2.7 super() error 2013, 4 upvotes, 1 star, 2 answers, 2K views, closed 2018 as dupe of super() fails with error: TypeError “argument 1 must be type, not classobj I retitled the latter "super() fails with error: TypeError “argument 1 must be type, not classobj” when parent does not inherit from object"
For comparison, SO's internal search on is:question [python-2.x] super
gives 50 questions