Hi David,

I think, I'm in support for a django.utils....flatten() 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 <https://github.com/django/django/pull/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 needed.
> 
> I'd like to garner "approval" + any thoughts on the best way to write such a 
> function.
>  * I'm aware that django.db expressions have similar-ish flatten() methods
>  * The PR author, Ion Alberdi, has done some nice work in writing up 
> alternatives and measuring performance
>  * A generator based solution would be nice if it could finish walking early 
> if used with any()
>  * Opinions on maintainability (readability) vs performance would be great
>  * Ideally I think it would be great if someone with some experience with 
> performant Python could chime in
> Cheers,
> David
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/CADyZw-5iwZPtsuw4Z%3D8nP16K%3DnP-0EAD5wZ4WaNy40L5oYuzfw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/django-developers/CADyZw-5iwZPtsuw4Z%3D8nP16K%3DnP-0EAD5wZ4WaNy40L5oYuzfw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a16146bd-41ba-4c8d-aabf-62825a782328%40betaapp.fastmail.com.

Reply via email to