Created
July 19, 2013 19:34
-
-
Save eltjpm/6041799 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: numba/type_inference/infer.py | |
=================================================================== | |
--- numba/type_inference/infer.py (revision 80685) | |
+++ numba/type_inference/infer.py (revision 80686) | |
@@ -850,7 +850,11 @@ | |
["is_int", 'is_object', 'is_bool']) | |
v1, v2 = node.left.variable, node.right.variable | |
- promotion_type = self.promote(v1, v2) | |
+ # Handle string formatting with % | |
+ if isinstance(node.op, ast.Mod) and v1.type.is_c_string: | |
+ promotion_type = object_ | |
+ else: | |
+ promotion_type = self.promote(v1, v2) | |
if (v1.type.is_pointer or v2.type.is_pointer): | |
self._verify_pointer_type(node, v1, v2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment