On 05/04/2012 08:04 AM, Larry Hastings wrote: > > On 05/03/2012 10:07 PM, Benjamin Peterson wrote: >>> + if (times && ns) { >>> + PyErr_Format(PyExc_RuntimeError, >> Why not a ValueError or TypeError? > > Well it's certainly not a TypeError. The 3.2 documentation defines TypeError > as: > > Raised when an operation or function is applied to an object of > inappropriate type. The associated value is a string giving details about > the type mismatch. > > If someone called os.utime with both times and ns, and the values of each > would > have been legal if they'd been passed in in isolation, what would be the type > mismatch?
What exception do you get otherwise when you call a function with inappropriate argument combinations? > Is using RuntimeError some sort of Pythonic faux pas? RuntimeError is not used very much in the stdlib, and if used, then for somewhat more dramatic errors. > Finally, I appreciate the feedback, but... why post it to python-dev? You > could > have sent me private email, or posted to the issue (#14127), the latter of > which > would have enabled using rich chocolaty Rietveld. I've seen a bunch of > comments > on checkins posted here and it all leaves me scratching my head. It has been argued in the past that python-committers is a better place for the review comments, but it was declined as being "not public enough". I agree that python-checkins or private email *definitely* isn't public enough. Georg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com