question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

super calls with arguments

See original GitHub issue

I touched a lot of super calls in #6629 and #6613 but there are several remaining occurences that haven’t been using the current class as first argument and/or the “bound argument” (first argument of the method) as second argument.

I believe lots of them are actually bugs but some of these look intentional. It could be worthwhile to revisit the remaining ones, just to exclude potential bugs and in case it was accidental to remove the obsolete arguments.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
MSeifert04commented, Sep 30, 2017

I also found the script:

import pathlib
import re

astropy_dir = ...
for filepath in pathlib.Path(astropy_dir).glob('**/*.py'):
    for lineno, line in enumerate(filepath.open(encoding='utf-8')):
        if re.search(r'super\(\w', line):
            print(filepath.relative_to(astropy_dir), lineno)
1reaction
bsipoczcommented, Sep 30, 2017

I’ve removed the package-novice tag, as for this one has to have some idea about the intentions for those calls, as @MSeifert04 said above they may very well be a bug or there for a reason.

Read more comments on GitHub >

github_iconTop Results From Across the Web

correct way to use super (argument passing) - Stack Overflow
It seems that object itself violates one of the best practices mentioned in the document, which is that methods which use super must...
Read more >
Supercharge Your Classes With Python super()
While the examples above (and below) call super() without any parameters, super() can also take two parameters: the first is the subclass, and...
Read more >
Working with the Python Super Function
“[Super is used to] return a proxy object that delegates method calls to a parent or sibling class of type. This is useful...
Read more >
Python | super() in single inheritance - GeeksforGeeks
Here we use super(SquarePrism, self).area() to call the area() method of the class Square. In the first argument, SquarePrism signifies that ...
Read more >
Missing argument to super() - QuantifiedCode
Missing argument to super() ¶. super() enables you to access the methods and members of a parent class without referring to the parent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found