Skip to content

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