Ticket #506 (closed defect: fixed)
doctest failure in cpp_classes.pyx
|Reported by:||craigcitro||Owned by:||craigcitro|
I ran into the following doctest failure with the current cython-devel (i.e. after the C++ merge):
... AssertionError: None != u"44:33: Invalid conversion from 'Python object' to 'int'"
This comes down to not falling into the "right" case in the best_match function in Cython/Compiler/PyrexTypes.py. The attached patch cleans this function up a bit, and adds a few comments. I'm happy to commit, but wouldn't mind one more set of eyes first.
(Even with this patch, there's still one issue I'm confused about: int.assignable_from(object) is returning False. My off-the-cuff guess would have been the opposite; if so, someone should open another ticket and assign it to me.)