New submission from Arfrever Frehtes Taifersar Arahesis 
<arfrever....@gmail.com>:

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
>>>

----------
messages: 165730
nosy: Arfrever, haypo, larry
priority: normal
severity: normal
status: open
title: os.utime() mishandles some arguments
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to