11PEP: 3135
22Title: New Super
3- Version: $Revision$
4- Last-Modified: $Date$
53Author: Calvin Spealman <
[email protected] >,
6475@@ -16,12 +14,14 @@ Post-History: `28-Apr-2007 <https://mail.python.org/pipermail/python-dev/2007-Ap
1614 `14-May-2007 <https://mail.python.org/pipermail/python-dev/2007-May/073127.html>`__,
1715 `12-Mar-2009 <https://mail.python.org/pipermail/python-bugs-list/2009-March/072665.html>`__
1816
17+
1918Numbering Note
2019==============
2120
2221This PEP started its life as :pep:`367`. Since it is now targeted
2322for Python 3000, it has been moved into the 3xxx space.
2423
24+
2525Abstract
2626========
2727
@@ -38,6 +38,7 @@ to replace the old::
3838
3939 super(Foo, self).foo(1, 2)
4040
41+
4142Rationale
4243=========
4344
@@ -83,6 +84,7 @@ of ``super`` in a method definition and only passes in the
8384``__class__`` cell when this is found. Thus, calling a global alias
8485of ``super`` without arguments will not necessarily work.
8586
87+
8688Closed Issues
8789=============
8890
@@ -107,7 +109,7 @@ However, this was found to be false, because calling an object only looks up
107109the __call__ method directly on the object's type. The following example shows
108110this in action.
109111
110- ::
112+ .. code:: python
111113
112114 class A(object):
113115 def __call__(self):
@@ -122,6 +124,7 @@ this in action.
122124In any case, this issue goes away entirely because classic calls to
123125``super(<class>, <instance>)`` are still supported with the same meaning.
124126
127+
125128Alternative Proposals
126129=====================
127130
@@ -182,12 +185,12 @@ be equivalent to calling the method on the ``super`` object with the same name
182185as the method currently being executed i.e. the following two methods would be
183186equivalent:
184187
185- ::
188+ .. code:: python
186189
187190 def f(self, *p, **kw):
188191 super.f(*p, **kw)
189192
190- ::
193+ .. code:: python
191194
192195 def f(self, *p, **kw):
193196 super(*p, **kw)
@@ -197,41 +200,34 @@ concerns are obvious. Guido has suggested that this should be excluded from
197200this PEP on the principle of KISS (Keep It Simple Stupid).
198201
199202
200-
201203History
202204=======
203- 12-Mar-2009 - Updated to reflect the current state of implementation.
204205
205- 29-Apr-2007 - Changed title from "Super As A Keyword" to "New Super"
206- - Updated much of the language and added a terminology section
207- for clarification in confusing places.
208- - Added reference implementation and history sections.
206+ 29-Apr-2007
207+ - Changed title from "Super As A Keyword" to "New Super"
208+ - Updated much of the language and added a terminology section
209+ for clarification in confusing places.
210+ - Added reference implementation and history sections.
211+
212+ 06-May-2007
213+ - Updated by Tim Delaney to reflect discussions on the python-3000
214+ and python-dev mailing lists.
215+
216+ 12-Mar-2009
217+ - Updated to reflect the current state of implementation.
209218
210- 06-May-2007 - Updated by Tim Delaney to reflect discussions on the python-3000
211- and python-dev mailing lists.
212219
213220References
214221==========
215222
216- .. [1] Fixing super anyone?
217- (https://mail.python.org/pipermail/python-3000/2007-April/006667.html)
223+ [1] Fixing super anyone?
224+ \ (https://mail.python.org/pipermail/python-3000/2007-April/006667.html)
218225
219- .. [2] PEP 3130: Access to Module/Class/Function Currently Being Defined (this)
220- (https://mail.python.org/pipermail/python-ideas/2007-April/000542.html)
226+ [2] PEP 3130: Access to Module/Class/Function Currently Being Defined (this)
227+ \ (https://mail.python.org/pipermail/python-ideas/2007-April/000542.html)
221228
222229
223230Copyright
224231=========
225232
226233This document has been placed in the public domain.
227-
228-
229-
230- ..
231- Local Variables:
232- mode: indented-text
233- indent-tabs-mode: nil
234- sentence-end-double-space: t
235- fill-column: 70
236- coding: utf-8
237- End:
0 commit comments