[Python-checkins] r56673 - peps/trunk/pep-3115.txt

guido.van.rossum python-checkins at python.org
Thu Aug 2 18:52:00 CEST 2007


Author: guido.van.rossum
Date: Thu Aug 2 18:51:59 2007
New Revision: 56673
Modified:
 peps/trunk/pep-3115.txt
Log:
Mention that type.__prepare__() exists for use via super().
Modified: peps/trunk/pep-3115.txt
==============================================================================
--- peps/trunk/pep-3115.txt	(original)
+++ peps/trunk/pep-3115.txt	Thu Aug 2 18:51:59 2007
@@ -132,6 +132,10 @@
 assignment algorithm. (Note also that 'metaclass' is a keyword-
 only argument as per PEP 3102 [6].)
 
+ Even though __prepare__ is not required, the default metaclass
+ ('type') implements it, for the convenience of subclasses calling
+ it via super().
+
 __prepare__ returns a dictionary-like object which is used to store
 the class member definitions during evaluation of the class body.
 In other words, the class body is evaluated as a function block


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /