Skip to content

Instantly share code, notes, and snippets.

@aaronchall
Created February 10, 2014 04:14
Show Gist options
  • Save aaronchall/8910275 to your computer and use it in GitHub Desktop.
Save aaronchall/8910275 to your computer and use it in GitHub Desktop.
Python with Braces
class MyClass(MyParent): #{
'''
demonstrating using braces with Python,
assuming best practice indentation
'''
def method(self): #{
for i in xrange(100): #{
try: #{
self.do_something(i) #}
except ValueError as e: #{
self.error_on(i) #}
else: #{
self.success(i) #}
finally: #{
self.cleanup(i) #}
#}
#}
#}
@aaronchall
Copy link
Author

I hope it's obvious that this is tongue in cheek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment