| 
          
         |  
         
          
            
              
                
                  
                    
  
  
    
  
   
  
  
  
    
	 
	 Python (Monty)
	 
     
  
   
  "Because Kilimanjaro is a pretty tricky climb you know.  Most of it's up until you reach the very very top, and then it tends to slope away rather sharply..."
  Been banging around Python a bit.  It's certainly a different feel than the classic Java/C++/C#/Delphi OO paradigm that I've been used to.  I've finally gotten a basic class and unit test up and running.  It's a pretty simple rectangle/area thing, but it works and it gets me one step closer to understanding Python.
  I also got PyUnit to work and did some Test First coding.  I actually found a bug in my dinky little rectangle class.  I had wanted it to throw an exception when I set width or height to a negative number, so I wrote tests to expect an error for setWidth, setHeight and the __init__ method.  But when I wrote the code, I forgot to check the input for the constructor.  Fortunately, PyUnit caught the oversight.  Bad job Peter; good job PyUnit.  
  Meanwhile, I'm watching classic Monty Python sketches as I work.  Perfectly appropriate I think, but it makes it more difficult to concentrate.
  More on Python over the weekend, as I progress.
     
    
      
    
 
   
  
  
 
  
  
                      |  
                   
                 |  
               
             |  
           
         | 
      
    
Post a Comment
<< Home