Skip to content

Conversation

@bridgetjs
Copy link

The language-python snippets seem to be somewhat outdated when it comes to declaring new classes. My main source for this is this post on stackoverflow

This PR proposes to change the default snippet to python3 style

#Old Python2 Style super

class ClassName(object):
    """docstring for ."""

    def __init__(self, arg):
        super(ClassName, self).__init__()
        self.arg = arg

#Python3 Style Super      
class ClassName(object):
    """docstring for ."""

    def __init__(self, arg):
        super().__init__()
        self.arg = arg

This can of course be fixed by users with their own snippets as I've done, but I thought I'd submit a PR for other users

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.

1 participant