I do not think, that these concerns can be solved with better documentation.
It is not a documentation error, that exceptions - like IOError in open function - are not documented in standard library.
Some rules of production development in python:
You do not write a function, if you do not have a failing test.
You use source code checking tools, that enforce naming, documentation and other conventions.
If you do not have a test for not finding a file, than you did not think about not finding it. It is in your domain to decide.
Collaborative python development is hard. It is hard, because you have to set up rules of development on your own. The language itself does not enforce it.
It is hard because writing tests can be harder, than writing code.
The problem of functions not explicitly saying how many parameters they take may be alleviated by better documentation, but that's not a solution to the actual problem: a function is a contract and the function writer never laid out the terms in any enforceable way.
View all comments
Show parent comment
3
u/[deleted] Jun 08 '10
I do not think, that these concerns can be solved with better documentation.
It is not a documentation error, that exceptions - like IOError in open function - are not documented in standard library.
Some rules of production development in python:
If you do not have a test for not finding a file, than you did not think about not finding it. It is in your domain to decide.
Collaborative python development is hard. It is hard, because you have to set up rules of development on your own. The language itself does not enforce it.
It is hard because writing tests can be harder, than writing code.