On 07/22/2019 07:27 PM, DL Neil wrote:

NameError conveys nothing to the user.
PythonVersionError is more communicative - and speaks volumes to 'us'.

The mainline code is something like:

     p = PythonEnvironment()
     try:
         p.compatibility( ...spec... )    # eg must be Py3 not 2.n
     except PythonVersionError:
         print( more illuminating errmsg )

This is why tests should check for the exact error raised, not that any error 
was raised.  (That testing bug bit me a couple times before I learned that 
lesson.)

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to