Created
October 29, 2018 12:25
-
-
Save abs51295/48e3c44473455c25875720fa53d502b6 to your computer and use it in GitHub Desktop.
Revisions
-
abs51295 created this gist
Oct 29, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import re _canonicalize_regex = re.compile(r"[-_.]+") def canonicalize_name(name): # This is taken from PEP 503. return _canonicalize_regex.sub("-", name).lower()