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
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to