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 Arfrever
Recipients Arfrever, larry, vstinner
Date 2012-07-17.21:02:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za>
In-reply-to
Content
Contrarily to documentation:

1. os.utime() accepts a tuple with floats passed by ns argument:
>>> os.utime(file, ns=(0.5, 0.5))
>>>

2. os.utime() does not accept explicit ns=None:
>>> os.utime(file, times=None)
>>> os.utime(file, ns=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: utime: 'ns' must be a tuple of two ints
>>>

3. os.utime() does not accept both times and ns when only times is a tuple:
>>> os.utime(file, times=None, ns=(0, 0))
>>> os.utime(file, times=(0, 0), ns=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: utime: you may specify either 'times' or 'ns' but not both
>>>
History
Date User Action Args
2012-07-17 21:02:38Arfreversetrecipients: + Arfrever, vstinner, larry
2012-07-17 21:02:38Arfreversetmessageid: <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za>
2012-07-17 21:02:38Arfreverlinkissue15382 messages
2012-07-17 21:02:37Arfrevercreate