This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk, docs@python
Date 2021-07-01.16:24:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625156659.02.0.858532247331.issue44544@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-07-01 16:24:19andrei.avksetrecipients: + andrei.avk, docs@python
2021-07-01 16:24:19andrei.avksetmessageid: <1625156659.02.0.858532247331.issue44544@roundup.psfhosted.org>
2021-07-01 16:24:18andrei.avklinkissue44544 messages
2021-07-01 16:24:18andrei.avkcreate