Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add super for mro #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rothloup
Copy link

Added calls in object init() methods to super() to support python's MRO. Addresses Issue #22.

Added super() call to __init__(), with *args and **kwargs
Added super() call to __init__(), with *args and **kwargs
Added super() call to __init__(), with *args and **kwargs
@davidhamann
Copy link
Owner

Thanks for the PR. A couple of remarks:

  • The added super() in server.py currently uses tabs as indentation, leading to a TabError exception and breaking the code
  • We could skip the argument to super(), as self should implicitly be passed (i.e. for example super() vs super(Server, self))
  • I would prefer to pass the surplus args only via kwargs to avoid confusion and make it more explicit when using multiple inheritance. What do you think? I'm currently also getting a mypy error for the super calls complaining about the call to object's __init__ with args, but I assume this should be fine as surplus args should already be consumed before the last __init__ call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants