Created
          August 9, 2011 19:53 
        
      - 
      
- 
        Save capttwinky/1135021 to your computer and use it in GitHub Desktop. 
  
    
      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 myStr(str): | |
| def pogoCase(self,jumpInt): | |
| return "".join([myCar.lower() if myInt % jumpInt else myCar.upper() for myInt, myCar in enumerate(self)]) | |
| thisThing = myStr("The quick brown fox jumped over the lazy dog.") | |
| print thisThing | |
| print thisThing.pogoCase(3) | |
| print thisThing.pogoCase(2) | |
| print type(thisThing) is str | |
| print isinstance(thisThing, str) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment