
On Tue, Jun 2, 2020 at 8:55 PM Nick Coghlan <ncoghlan@gmail.com> wrote:
On Tue., 2 Jun. 2020, 11:23 am Steven D'Aprano, <steve@pearwood.info> wrote:
The conceptual idea here is that the "truncate" flag name would technically be a shorter mnemonic for "truncate_silently", so clearing it gives you an exception rather enabling padding behaviour.
Flipping the sense of the flag also means that "truncate=True" will appear in IDE tooltips as part of the function signature, providing significantly more information than "strict=False" would.
"Significantly" more? I don't think so.
Truncate at what?
- some maximum length; - some specific element; - at the shortest input.
Given that the only input parameters are the iterables themselves, it's a stretch to even consider the first two as possibilities.
Why? I can conceivably imagine that zip(iter1, iter2, truncate=5) would consume at most 5 elements from each iterable. It's not much of a stretch. It doesn't happen to be what's proposed, but it's a reasonable interpretation. (Though then the default would probably be truncate=None to not truncate.) ChrisA