Re: Proposal to add a flatten() to django.utils

2022-10-18 Thread David Sanders
> > +1 for that, though this will need some careful design between perf optimizations and how much general purpose it should be. Perhaps before optimising we could start out with the basic readable version and tailor it moving forward. It's possible this could be irrelevant if it's only ever use

Re: Proposal to add a flatten() to django.utils

2022-10-17 Thread Jörg Breitbart
+1 for that, though this will need some careful design between perf optimizations and how much general purpose it should be. I remember a discussion years ago, whether this should go into python batteries. Ended up unresolved, as the optimization goals depend alot on the provided data structur

Re: Proposal to add a flatten() to django.utils

2022-10-17 Thread Markus Holtermann
Hi David, I think, I'm in support for a django.utilsflatten() function with the requirements / constraints you outlined below. Cheers, Markus On Mon, Oct 17, 2022, at 8:31 AM, David Sanders wrote: > Hi folks, > > As part of PR 16175 there was

Proposal to add a flatten() to django.utils

2022-10-16 Thread David Sanders
Hi folks, As part of PR 16175 there was some discussion around flattening lists/tuples as part of the solution. I proposed that if we create a flattening function that there'd be some benefit in sharing that in django.utils for other components if need