#21111: generic.View.__init__ should call super
--------------------------------------+------------------------------------
Reporter: glin@… | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Generic views | Version: 1.5
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by tomchristie):
This seems like a bit of an anti-pattern to me.
If more than one intermediate class is defining `__init__()` then it's up
to the superclass to properly determine the behaviour.
We don't call into `super` in the base class implementations of, say
`get_context_data()` it's not at all clear to me that it's ether a
necessary or a good thing to do in `__init__()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21111#comment:3>
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/072.0c912feac416a680713fcda346dd4073%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.