(callable)
| 135 | |
| 136 | |
| 137 | def inspect_format_method(callable): |
| 138 | if not isinstance(callable, (types.MethodType, |
| 139 | types.BuiltinMethodType)) or \ |
| 140 | callable.__name__ != 'format': |
| 141 | return None |
| 142 | obj = callable.__self__ |
| 143 | if isinstance(obj, string_types): |
| 144 | return obj |
| 145 | |
| 146 | |
| 147 | def safe_range(*args): |