[docs] In an unittest documentation example, __version__ is not PEP 396
Robert Vanden Eynde
robertvandeneynde at hotmail.com
Mon Jul 9 22:27:13 EDT 2018
Hello, in an example in
https://docs.python.org/3.8/library/unittest.html#skipping-tests-and-expected-failures
One could read
@unittest.skipIf(mylib.__version__ < (1, 3),
"not supported in this library version")
However, PEP 396 indicates "__version__ number SHOULD be a string", therefore the example is against a good python practice, and package manager like me would loose time googling the what the good practice is.
I suggest changing the example to skipIf(mylib.version_info < (1, 3), ...).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180710/62fdeb02/attachment-0001.html>
More information about the docs
mailing list