#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 loic84):
IMO it's good practice to add it.
Breaking the `__init__` chain tend to bite you when you least expect it,
#20619 was an example of that.
As I already mentioned on IRC, the base implementation of
`get_context_data()` was specifically added in #16074 to play the role of
`object.__init__()`, which is, always being there so subclasses can just
call `super` without thinking about the `__mro__`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21111#comment:4>
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.7e476462628f59faba99cc28cd7c6bce%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.