Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a selection of Python snippets and commands I used to use in Textmate that I missed when I moved to sublime.

Snippet list

[]: List comprehension and List comprehension with If statement

(): Tuple comprehension

{}: Dictionary comprehension

ternary: Gives a ternary operator

try: Python3 try-catch statements

with: With context block, defaults to opening a file so handy way to remember how to do that

fordict: For loop using dictionary.items() as the iterator

else: Adds a colon and new line, it's just something I miss from my Textmate bundle

re: A selection of common regex commands

query: A pair of database query shortcuts using a cursor

excep: Shortcut to - raise Exception("")

exceptions: A list of exception types

magic: A selection of magic functions. The most common are each a separate snippet while the less common are lumped together as one list per category.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors