[Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes. (original) (raw)
Georg Brandl g.brandl at gmx.net
Fri May 4 09:01:44 CEST 2012
- Previous message: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 05/04/2012 08:04 AM, Larry Hastings wrote:
On 05/03/2012 10:07 PM, Benjamin Peterson wrote:
+ if (times && ns) { + PyErrFormat(PyExcRuntimeError, 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
- Previous message: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]