On 03Apr2022 21:45, Peter J. Holzer <hjp-pyt...@hjp.at> wrote: >Yup. I need something like this quite frequently, so I wrote a little >utility function (which I copy and paste into lots of code - I probably >should package that up, but a package with a single short function feels >weird).
Start with one with a slightly generic name. It will grow. I've got a cs.seq module with sequence(ish) related utility functions in it. It started with very few functions and now has several. I've also got a cs.mappings module which started with a couple of mapping classes and now has a grab bag of mapping utility stuff. Incremental growth. Cheers, Cameron Simpson <c...@cskk.id.au> -- https://mail.python.org/mailman/listinfo/python-list