Check if an object is of a type that probably means it's data.
(object)
| 190 | return object.__module__ |
| 191 | |
| 192 | def isdata(object): |
| 193 | """Check if an object is of a type that probably means it's data.""" |
| 194 | return not (inspect.ismodule(object) or inspect.isclass(object) or |
| 195 | inspect.isroutine(object) or inspect.isframe(object) or |
| 196 | inspect.istraceback(object) or inspect.iscode(object)) |
| 197 | |
| 198 | def replace(text, *pairs): |
| 199 | """Do a series of global replacements on a string.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…