(from_type, to_type)
| 132 | # Cast replacement from from_type to to_type if the replacement and original |
| 133 | # types match from_type and to_type |
| 134 | def conditional_cast(from_type, to_type): |
| 135 | if replacement_type == from_type and original_type == to_type: |
| 136 | return True, to_type(replacement) |
| 137 | else: |
| 138 | return False, None |
| 139 | |
| 140 | # Conditionally casts |
| 141 | # list <-> tuple |
no outgoing calls
no test coverage detected