Created
          February 10, 2014 04:14 
        
      - 
      
 - 
        
Save aaronchall/8910275 to your computer and use it in GitHub Desktop.  
    Python with Braces
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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) #} | |
| #} | |
| #} | |
| #} | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
I hope it's obvious that this is tongue in cheek.