07.02.20 20:41, Antoine Pitrou пише:
What you call "quite a bit of boilerplate" is just an additional line of code. If you are frequently being bothered by this (I'm curious what the context is?), it's easy to add the desired helper function to your own library.
In general, I don't think adding tons of trivial convenience helpers is good API design, it ends up making the API more difficult to discover and digest.
Concur with Antoine.