On Wed, May 6, 2020 at 8:37 PM Chris Angelico <rosuav@gmail.com> wrote:
> The only precedent that jumps out for me is itertools.chain() and itertools.chain.from_iterable(). It's quite likely that something I don't use much has used the same pattern though.
That's an example of a very common pattern of alternate constructors.
The other Chris' comment was:
zip.shortest(...) # same as zip(...) / zip.longest(...) / zip.checksame(...)
I kind of like this -- is there any precedent for it in the standard library?
If it's a very common pattern, do you know of any in the standard library beyond the one I mentioned? Not about bikeshedding the spelling of the different constructors, but just:
1. A callable;
2. That has one or more functions attached to perform some variation on what that callable itself does.
--
The dead increasingly dominate and strangle both the living and the
not-yet born. Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.