Skip to content

Instantly share code, notes, and snippets.

@sashahart
Created May 29, 2013 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sashahart/5674417 to your computer and use it in GitHub Desktop.
Save sashahart/5674417 to your computer and use it in GitHub Desktop.
sample python data for checking vim highlighting
#!/bin/bash
# coding: utf-8
"""Docstring for this module.
This must be quite readable but does not need to be obtrusive.
"""
from collections import Counter
import re
import hotshot
class ClassName(object, Counter):
"""Class docstring.
TODO: stuff my face.
:arg foo:
eat my face, basically.
:returns:
the jedi go in here.
"""
# Operator hoedown
a, b = 0, 1 + re
a + b - a * b / a * 3 and False % 1
a < b > b <= a != b >= b == 2
a = ~5 | 6 & 3
a and b in b is a and not b or a
x = lambda: None
raise None
def __init__(self, arg1, arg2):
# TODO: whatever.
self.attr = arg1
self.attr2 = "specialchars:\n\tfoo"
list([1,2,3])
dict({1:2, 3:4})
True == False
2.34
5
0x2 + 0o3 + 0b1 or 3 and 4
try:
pass
except Exception:
pass
finally:
pass
if True:
pass
else:
xyzzy = 34
return 2394
"""foo bar baz
fkeke\n
eke
"""
# Long expository comments here. Long expository comments here. Long
# expository comments here.
# TODO: eat me.
xyzzy['zz'] = 4
@xyzzy
def function_name(arg):
"""Function docstring.
:arg:
snoodlecakes
:returns:
jarp
"""
while True:
break
if abcefgh == 'abce\n\nfgh':
(456, "456")
return arg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment