
-----Original Message----- From: Alexander Belopolsky [mailto:alexander.belopolsky@gmail.com] Sent: Wednesday, October 25, 2017 12:07 PM To: Alex Walters tritium-list@sdamon.com Cc: Chris Barker chris.barker@noaa.gov; Python-Dev <python- dev@python.org> Subject: Re: [Python-Dev] iso8601 parsing
On Oct 25, 2017, at 11:45 AM, Alex Walters tritium-list@sdamon.com
wrote:
it means the type of the first argument changes the semantic meaning of
subsequent
arguments, and that just adds a level of confusion to any api.
No, it does not. Passing a string a the first of three arguments will
still be a
type error.
And that is a confusing api. The problem has already been solved by classmethod alternate constructors - they are already used widely in the datetime api. NOT using classmethod constructors is new and confusing for the SINGLE use case of parsing iso formatted dates and times. Why is that special? Why isn't ordinal time special to get into __init__?