Message164422
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. |
|
Date |
User |
Action |
Args |
2012-06-30 19:55:23 | dewin | set | recipients:
+ dewin, docs@python |
2012-06-30 19:55:23 | dewin | set | messageid: <1341086123.85.0.135321380132.issue15228@psf.upfronthosting.co.za> |
2012-06-30 19:55:23 | dewin | link | issue15228 messages |
2012-06-30 19:55:23 | dewin | create | |
|