#21111: generic.View.__init__ should call super
--------------------------------------+--------------------
     Reporter:  glin@…                |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Generic views         |    Version:  1.5
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 Method {{{__init__}}} of class django.views.base.View should contain:

 {{{
 #!python
     super(View, self).__init__()
 }}}

 Even though object's {{{__init__()}}} method is seemingly no-op, it should
 still be called, because:

  1. It has important role in multiple inheritance (and that can happen in
 generic views easily)
  2. Generally it's good practice to call it - for example you can later
 introduce an intermediate class in the class hierarchy.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21111>
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.9dd2c9ef723e33a765af5da6de6aee9e%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to