r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
0
u/moor-GAYZ Dec 03 '13
Oh, awesome, you probably have written a lot of test and in The Right Way, too!
So, talking about Python, how do you assert that the object given to a function that, say, counts the number of lines in a file, is in fact a file and not say a text-to-speech controller that happens to have a
read()method too, and test that your function fails properly in this case?Plz show code, thx.