PEP 3141: __ratio__ instead of numerator/denominator

That doesn’t really matter. Maybe SageMath could have used a property, but they didn’t. It’s just a choice, there is nothing wrong with a method.

Yes.

I don’t see how to do that technically. What kind of object would q.denominator then be?

OK, so let’s add such functions to the numbers module.

The function numbers.denominator() could try __denominator__ and denominator.

No particular reason: somebody posted it as a bug report, that’s all. Personally, I don’t think that PEP 3141 matters that much. But given that SageMath has a rational numbers class, it seems like it should support PEP 3141 but it cannot.

Sure, as long as it won’t involve massively breaking backwards compatibility.