A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-April/110528.html below:

Pure Python/C Accelerator Module Compatibiilty Requirements

[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements [Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty RequirementsStefan Behnel stefan_ml at behnel.de
Thu Apr 7 07:15:09 CEST 2011
Brett Cannon, 06.04.2011 19:40:
> On Tue, Apr 5, 2011 at 05:01, Nick Coghlan wrote:
>> However, there actually *is* a significant semantic discrepancy in the
>> heapq case, which is that py_heapq is duck-typed, while c_heapq is
>> not:
>>
>> TypeError: heap argument must be a list
>
> That's true. I will re-word it to point that out. The example code still
> shows it, I just didn't explicitly state that in the example.

Assuming there always is an "equivalent" Python implementation anyway, what 
about using that as a fallback for input types that the C implementation 
cannot deal with?

Or would it be a larger surprise for users if the code ran slower when 
passing in a custom type than if it throws an exception instead?

Stefan

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4