WrightTools.kit.string2identifier
- WrightTools.kit.string2identifier(s, replace=None)[source]
Turn a string into a valid python identifier.
This method restricts identifier characters to ASCII letters, numbers, and underscore. The characters are slightly more restrictive than python 3 itself, and may be refactored in future (see PEP 3131).
For non-valid characters, the default replacement is “_”. Replacement assignments can be customized with the replace kwarg.
- Parameters:
- Returns:
valid python identifier.
- Return type: