Antoine Pitrou <pit...@free.fr> added the comment: > I would think that deprecating error-prone constructs is well within > normal library evolution. For example, several interfaces that > accepted floats by truncating them to ints were deprecated in the > past.
That's because silent truncation to int will lead to possible loss of precision, or (worse) to poorly defined behaviour. For example, if you call file.read(3.5), should it try to read 3 bytes or 4 bytes? Deprecating such use is perfectly reasonable, because it disambiguizes the API and avoids the use of a wrong type. On the other hand, using positional arguments presents none of these problems. There is no reason to deprecate it except your own aesthetical preferences. Therefore I'm still -1. > Has anyone seen (non-buggy) code in the wild that used > 3 positional > arguments to timedelta? Why do you think such code doesn't exist? It's not like timedelta() is an extremely difficult API to use, even without keyword arguments. Using Google Code Search, you will find snippets such as: FIVE_MINUTES = datetime.timedelta(0, 0, 0, 0, 5) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9169> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com