(obj)
| 1135 | |
| 1136 | |
| 1137 | def _try_iter(obj): |
| 1138 | if obj is None: |
| 1139 | return obj |
| 1140 | if _is_exception(obj): |
| 1141 | return obj |
| 1142 | if _callable(obj): |
| 1143 | return obj |
| 1144 | try: |
| 1145 | return iter(obj) |
| 1146 | except TypeError: |
| 1147 | # XXXX backwards compatibility |
| 1148 | # but this will blow up on first call - so maybe we should fail early? |
| 1149 | return obj |
| 1150 | |
| 1151 | |
| 1152 | class CallableMixin(Base): |
no test coverage detected
searching dependent graphs…