Message396817
https://docs.python.org/3.11/library/textwrap.html
The 3 functions - wrap, fill, shorten -- have a signature like `(..., **kwargs)`, where kwargs are instance attrs of TextWrap. It would be better to list all possible args in the signature because:
- more convenient for users rather than scrolling back and forth between description of the function and the list under TextWrap
- the list under TextWrap is so long it doesn't fit on one screen. It would be great to have a compact list in the signature of these 3 functions
- it's confusing -- at first sight, it seems like **kwargs will be taken in to be used by a subclass or maybe stored as attrs on the instance and not used, and it seems like arbitrary kwargs can be given.
- the only reason it was done so, I guess, is that the list is long and unwieldy. But that's also the reason why the listing under TextWrap takes up more than a screenful and so more of an argument to have a compact list in the signature.
- in case of fill, some args are a no-op, so they can be omitted from the signature, that will make it much easier to see all effective arguments. |
|
Date |
User |
Action |
Args |
2021-07-01 16:24:19 | andrei.avk | set | recipients:
+ andrei.avk, docs@python |
2021-07-01 16:24:19 | andrei.avk | set | messageid: <1625156659.02.0.858532247331.issue44544@roundup.psfhosted.org> |
2021-07-01 16:24:18 | andrei.avk | link | issue44544 messages |
2021-07-01 16:24:18 | andrei.avk | create | |
|