Skip to content

Instantly share code, notes, and snippets.

View jstitch's full-sized avatar
💭
do not fix bad code, rewrite it

Javier Novoa Cataño jstitch

💭
do not fix bad code, rewrite it
View GitHub Profile
@goFrendiAsgard
goFrendiAsgard / var_dump.py
Last active October 14, 2015 06:57
var_dump implementation in python
# the idea was come from https://gist.github.com/jvanasco/1616707
import types
def _var_dump(variable, depth = 0, not_new_line = False):
padding = " " * 4 * depth
key_padding = " " * 4 * (depth+1)
first_padding = '' if not_new_line else padding
not_new_line = True
depth+= 1