[Python-checkins] r54928 - peps/trunk/pep-3119.txt
guido.van.rossum
python-checkins at python.org
Tue Apr 24 01:37:34 CEST 2007
Author: guido.van.rossum
Date: Tue Apr 24 01:37:29 2007
New Revision: 54928
Modified:
peps/trunk/pep-3119.txt
Log:
Add some text that Talin suggested.
Modified: peps/trunk/pep-3119.txt
==============================================================================
--- peps/trunk/pep-3119.txt (original)
+++ peps/trunk/pep-3119.txt Tue Apr 24 01:37:29 2007
@@ -101,9 +101,19 @@
done using isinstance(), and the presence of a particular ABC means
that the test has passed.
+In addition, the ABCs define a minimal set of methods that establish
+the characteristic behavior of the type. Code that discriminates
+objects based on their ABC type can trust that those methods will
+always be present. Each of these methods are accompanied by an
+generalized abstract semantic definition that is described in the
+documentation for the ABC. These standard semantic definitions are
+not enforced, but are strongly recommended.
+
Like all other things in Python, these promises are in the nature of a
-gentlemen's agreement - which means that the language does not attempt
-to enforce that these promises are kept.
+gentlemen's agreement, which in this case means that while the
+language does enforce some of the promises made in the ABC, it is up
+to the implementer of the concrete class to insure that the remaining
+ones are kept.
Specification
@@ -150,7 +160,7 @@
The exception raised when attempting to instantiate an abstract
class. It derives from ``TypeError``.
-**Open issues:**
+**Open issues:**
* Implementing the prohibition on instantiation may weigh down
instance creation of popular built-in classes like ``tuple`` or
More information about the Python-checkins
mailing list