mirror of https://github.com/python/cpython
Added 'translate_longopt()' function.
This commit is contained in:
parent
2f2b6c62ba
commit
68ded6e6f1
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue