MCPcopy Create free account
hub / github.com/twisted/twisted / _isPythonIdentifier

Function _isPythonIdentifier

src/twisted/python/modules.py:87–96  ·  view source on GitHub ↗

cheezy fake test for proper identifier-ness. @param string: a L{str} which might or might not be a valid python identifier. @return: True or False

(string)

Source from the content-addressed store, hash-verified

85
86
87def _isPythonIdentifier(string):
88 """
89 cheezy fake test for proper identifier-ness.
90
91 @param string: a L{str} which might or might not be a valid python
92 identifier.
93 @return: True or False
94 """
95 textString = nativeString(string)
96 return " " not in textString and "." not in textString and "-" not in textString
97
98
99def _isPackagePath(fpath):

Callers 1

iterModulesMethod · 0.85

Calls 1

nativeStringFunction · 0.90

Tested by

no test coverage detected