diff options
| author | Greg Ward <gward@python.net> | 2000-09-25 01:58:31 +0000 |
|---|---|---|
| committer | Greg Ward <gward@python.net> | 2000-09-25 01:58:31 +0000 |
| commit | 68ded6e6f148ef0dc95418be7a9bb61385942362 (patch) | |
| tree | 3319d647892304b2b42f0c6f8cdb72de51360676 | |
| parent | 2f2b6c62baf42e06c06f0dcae4879cf88dd6a916 (diff) | |
| download | cpython-git-68ded6e6f148ef0dc95418be7a9bb61385942362.tar.gz | |
Added 'translate_longopt()' function.
| -rw-r--r-- | Lib/distutils/fancy_getopt.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/distutils/fancy_getopt.py b/Lib/distutils/fancy_getopt.py index eaf6073760..f93520019f 100644 --- a/Lib/distutils/fancy_getopt.py +++ b/Lib/distutils/fancy_getopt.py @@ -470,6 +470,13 @@ def wrap_text (text, width): return lines # wrap_text () + + +def translate_longopt (opt): + """Convert a long option name to a valid Python identifier by + changing "-" to "_". + """ + return string.translate(opt, longopt_xlate) class OptionDummy: |
