Chris Angelico wrote:
But as a part of the
function's declared intent, it's fine to have a postcondition of "the
directory will be empty" even though something could drop a file into
it.

If you only intend the contract to serve as documentation,
I suppose that's okay, but it means you can't turn on runtime
checking of contracts, otherwise your program could suffer
spurious failures.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to