This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients eric.araujo, gotcha, swamiyeswanth, tarek
Date 2011-02-19.21:50:43
SpamBayes Score 1.4190584e-06
Marked as misclassified No
Message-id <1298152243.96.0.329258564119.issue11060@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-02-19 21:50:44eric.araujosetrecipients: + eric.araujo, tarek, swamiyeswanth, gotcha
2011-02-19 21:50:43eric.araujosetmessageid: <1298152243.96.0.329258564119.issue11060@psf.upfronthosting.co.za>
2011-02-19 21:50:43eric.araujolinkissue11060 messages
2011-02-19 21:50:43eric.araujocreate