Message227546
| Author |
scoder |
| Recipients |
akira, brg@gladman.plus.com, gladman, mark.dickinson, mrabarnett, scoder, steven.daprano, terry.reedy, vstinner, wolma |
| Date |
2014年09月25日.16:09:13 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1411661353.22.0.131494634495.issue22477@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
IMHO, the most straight forward way for a new gcd() function to work would be to always, predictably return a non-negative value and let users handle all cases themselves where a negative sign of any or all input values has a specific meaning to them. That's the path of least surprise, and it's very easy to implement at the C level for PyLong values (as they are internally unsigned anyway). |
|