Éric Araujo <mer...@netwok.org> added the comment:

You don’t need a new function (and certainly not in the __init__ submodule, the 
right place would be the version module), just do something like this:

try:
    NormalizedVersion(text)
except IrrationalVersionError:
    # version is invalid

Alternative: use suggest_normalized_version, which returns a string or None, 
then display according text to prompt the user to accept the suggested version 
or type another.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to