#29113: django.forms.formsets.all_valid() short circuit
------------------------------------------------+------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
If in {{{django.forms.formsets.all_valid()}}} the calls to
{{{formset.is_valid()}}} can be short-circuited, replace the body of the
function with {{{return all(formset.is_valid() for formset in
formsets)}}}. Otherwise write as comment, that short-circuiting is not
feasible and replace the {{{if not formset.is_valid(): valid = False}}}
with {{{valid &= formset.is_valid()}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29113>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.fe6bc632cc69a54106dd819cefa2e6c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.