Currently, calling divmod() on a class with __floordiv__ and __mod__ defined, 
but not __divmod__ raises a TypeError. Is there any reason why it doesn't 
fallback to (self // x, self % x)? The invariants described in the function 
documentation should still apply (with well behaved % and //). If divmod() 
doesn't make sense setting it to None should be permitted.

- Spencer
Python-ideas mailing list
Code of Conduct:

Reply via email to