This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dewin
Recipients dewin, docs@python
Date 2012-06-30.19:55:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341086123.85.0.135321380132.issue15228@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for os.utime() at http://docs.python.org/py3k/library/os.html#os.utime states:

"Set the access and modified times of the file specified by path. [...] The effect is similar to running the Unix program touch on the path.)"

Unlike 'touch', os.utime() will not create an empty file if called on a file that does not exist.  IMO the current behavior is correct, but the comparison of os.utime() to touch implies that it would create empty files.

I suggest clarifying the documentation to emphasize that os.utime() will not create new files and raises OSError in the event that the file does not exist.
History
Date User Action Args
2012-06-30 19:55:23dewinsetrecipients: + dewin, docs@python
2012-06-30 19:55:23dewinsetmessageid: <1341086123.85.0.135321380132.issue15228@psf.upfronthosting.co.za>
2012-06-30 19:55:23dewinlinkissue15228 messages
2012-06-30 19:55:23dewincreate