C.T. Matsumoto wrote:
At least for this example, it seems funny that some of the convenience functions on a type, when strung together can do some pretty weird things that need checking, but nevertheless are nicely placed in the function your are using them in. A better example is re.

Yes, though as Konrad suggests, it does make sense to not string together too much of that functionality... If you feel uncertain about a piece of code and want to test it, do split it up so it becomes easier to test, it is usually not bad to change your code to improve testability. Also it has several additional advantages, such as making the code more readable and making it easier to override bits (especially if you're using classes/objects).

Cheers,

Guido
_______________________________________________
Python-nl mailing list
Python-nl@python.org
http://mail.python.org/mailman/listinfo/python-nl

Antwoord per e-mail aan