On Wed, 03 Feb 2010 06:42:52 -0800, Paul Rubin wrote: > One nice trick with static types is if you change > what the method does (even if its type signature doesn't change), you > can rename the method: > > class.method2(string name, int count): # change 'method' to > 'method2' > > and recompile your codebase. Every place in the code that called > 'method' now gets a compile time "undefined method" error that you can > examine to see if you need to update it. This is something you can't > catch with unit tests because the call sites can be in distant modules.
I don't understand why that won't work with unit tests. If you change the name of a method, surely your unit tests will now start failing with AttributeError? -- Steven -- http://mail.python.org/mailman/listinfo/python-list