Skip to content

A collection of all snippets usable in VS code (Currently working on Python snippets)

License

Notifications You must be signed in to change notification settings

tauzahmd/vs-code-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

vs-code-snippets

A collection of all snippets/boiler-plate usable in VS code (Currently working on Python snippets)

Table of Contents


Python

Prefix Description
propertygetter Python property getter
propertysetter Python property getter and setter
classinit Python class with an __init__()
classreprstr Python class with __str__() and __repr__()
classsequence Python class with __init__(), __getitem__(), __setitem__(), __delitem__(), __len__(), and insert()

Julia

TODO


Code Reference

Python

propertygetter
@property
def name(self):
    return self._name
propertysetter
@property
def name(self):
    return self._name

@name.setter
def name(self, ):
    self._name = 
classinit
class Name(object):

    def __init__(self):
        pass
classreprstr
class Name(object):

    def __repr__(self):
        """Representation of repr()."""
        pass

    def __str__(self):
        """Representation of str()."""
        pass
classsequence
class Name(object):

    def __init__(self):
        self._data = dict()

    def __getitem__(self, key):
        """Getter."""
        value = self._data[key]
        return value

    def __setitem__(self, key, value):
        """Setter."""
        self._data[key] = value

    def __delitem__(self, key):
        """Delete Key"""
        del self._data[key]

    def __len__(self):
        """Length"""
        return len(self._data)

    def insert(self):
        pass

Contribution

Create a new branch and start a pull request.

About

A collection of all snippets usable in VS code (Currently working on Python snippets)

Resources

License

Stars

Watchers

Forks

Packages

No packages published