Skip to content

Instantly share code, notes, and snippets.

@boylea
Created October 3, 2015 23:12

Revisions

  1. boylea created this gist Oct 3, 2015.
    34 changes: 34 additions & 0 deletions ugly_indentation.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    uglystick = True
    def ugly_python():
    if uglystick:
    print "one space"
    if uglystick:
    print 'five space'

    def more_uglyness():
    if uglystick:
    print 'two space x2'
    if True:
    print 'how far is this even indented'
    else
    print 'Else MUST match at least'

    def spacey_function():
    print "here I am"
    if True:
    "alone again"

    def tight_function():
    print 'Cozy in here'
    if True:
    "don't do this"

    # I was going to include a example of mixed tabs + spaces, but we all know
    # that's bad, and sublime text seems to be really good at not letting me do
    # that to myself

    if uglystick:
    ugly_python()
    more_uglyness()
    spacey_function()
    tight_function()