6 ms·
I actually love forcing people into a fairly consistent coding style, but everything else about the language irks me compared to my previous extensive use of Pe
by mmagin 9y ago
I actually love forcing people into a fairly consistent coding style, but everything else about the language irks me compared to my previous extensive use of Perl (on a large enterprise software product).
One particularly big thing, that it doesn't have much of a distinct compilation phase. You'll write some script you want to run to do some one-off task that will take the next hour, only to find it crashed after 20 minutes when it hits some boneheaded syntax error you made.
- makecheck 9y agoFor that though you can use linting tools such as "pylint"; catches a lot of errors that might otherwise be runtime exceptions.
- dwaltrip 9y agoFor this reason, I generally test scripts like that with a small slice of the data, or small set of dummy data. Then one can also verify that the output is reasonable -- which is good to do even with a compiled language that would catch all syntax errors ahead of time.
- shalabhc 9y agoTake a look at mypy and pytype - there is a drive in the Python community to add a verification system to the language.
- cbr 9y agoonly to find it crashed after 20 minutes when it hits some boneheaded syntax error you made I find mypy to be pretty useful for this.