[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements
Terry Reedy
tjreedy at udel.edu
Wed Apr 6 07:02:05 CEST 2011
On 4/5/2011 3:57 PM, Raymond Hettinger wrote:
> [Brett]
>> This PEP requires that in these instances that both
>> the Python and C code must be semantically identical
>
> Are you talking about the guaranteed semantics
> promised by the docs or are you talking about
> every possible implementation detail?
I personally would limit the guarantee to what the docs promise. That is
all people should expect anyway if the Python code were executed by some
other implementation, or by someone else's system-coded version, or even
a different version of CPython.
This assumes that the docs have reasonably complete specifications. The
was improved in 3.2 and should improve further as system-code
implementers find more holes.
Exceptions are a bit of a gray area. The docs are quite uneven about
specifying exceptions. They sometimes do, sometimes do not, even for
similar functions. This should be another PEP though.
--
Terry Jan Reedy
More information about the Python-Dev
mailing list