News for hackers. Stuff that matters.
Re:Python JITs are coming by dalke on Thursday August 25, 2016 @03:46AM (#12357467)
There is no contradiction. There are two specifications, the C language specification and the Python language specification.

Programs written in Python follow the Python language specification.

When run in CPython, the implementation follows the C language specification.

If the implementation uses C UB, which causes it to be out of compliance with the Python specification, then it is both undefined behavior for C and a failure to follow defined behavior for Python.

It is not undefined behavior for Python.

I have said multiple times that I don't like how your non-standard definition mixed the two together. It is no longer interesting to come up with new ways to restate my statement.

Re:Python JITs are coming by twblalock on Thursday August 25, 2016 @01:30PM (#12360823)
> If the implementation uses C UB, which causes it to be out of compliance with the Python specification, then it is both undefined behavior for C and a failure to follow defined behavior for Python.

That's true, but it's not what you said. You said "the C specification is irrelevant" when I brought up bugs in the C code in CPython, and you said they were implementation bugs but not UB, because the Python spec doesn't define them as UB -- even though the code we were talking about was C! In other words, case 2 in my previous comment.

Now you say "When run in CPython, the implementation follows the C language specification," and "If the implementation uses C UB, which causes it to be out of compliance with the Python specification, then it is both undefined behavior for C and a failure to follow defined behavior for Python."

Those arguments contradict each other. Which one do you believe?