Commit 169b458c authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanups

parent 13fb4423
...@@ -4079,7 +4079,7 @@ def best_match(args, functions, pos=None, env=None): ...@@ -4079,7 +4079,7 @@ def best_match(args, functions, pos=None, env=None):
assignable = dst_type.assignable_from(c_src_type) assignable = dst_type.assignable_from(c_src_type)
if assignable: if assignable:
src_type = c_src_type src_type = c_src_type
needed_coercions[func] = i, dst_type needed_coercions[func] = (i, dst_type)
if assignable: if assignable:
if src_type == dst_type or dst_type.same_as(src_type): if src_type == dst_type or dst_type.same_as(src_type):
...@@ -4097,8 +4097,7 @@ def best_match(args, functions, pos=None, env=None): ...@@ -4097,8 +4097,7 @@ def best_match(args, functions, pos=None, env=None):
else: else:
score[0] += 1 score[0] += 1
else: else:
error_mesg = "Invalid conversion from '%s' to '%s'"%(src_type, error_mesg = "Invalid conversion from '%s' to '%s'" % (src_type, dst_type)
dst_type)
bad_types.append((func, error_mesg)) bad_types.append((func, error_mesg))
break break
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment