Paul Ganssle <p.gans...@gmail.com> added the comment:

> But I'm wondering how the `fromisocalendar` API relates to this patch.
> Rather, wouldn't this patch contribute to improving the usability of the 
> `fromisocalendar` API?

The `fromisocalendar` API relates to this patch only insofar as it is the 
inverse function of `isocalendar` and in some sense it allows specifying the 
parameters by keyword rather by position. I was merely bringing up that we 
didn't choose that API because we thought people would or should want or need 
to specify the individual components by keyword but because we didn't have an 
easy way to maintain the same API in the pure Python and C APIs at the time. By 
contrast, returning a plain tuple from `isocalendar()` is the easier *and* more 
performant thing to do, and given that any benefits seem marginal I'm against 
the switch.

I think that the usability of `fromisoformat` with the output of `isocalendar` 
will be largely unchanged if we were to switch to returning a namedtuple.

----------

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

Reply via email to