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.

Reply via email to