summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index cc7b28e..8dea228 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -150,9 +150,9 @@ Glossary
object.
duck-typing
- A pythonic programming style which determines an object's type by inspection
- of its method or attribute signature rather than by explicit relationship
- to some type object ("If it looks like a duck and quacks like a duck, it
+ A programming style which does not look at an object's type to determine
+ if it has the right interface; instead, the method or attribute is simply
+ called or used ("If it looks like a duck and quacks like a duck, it
must be a duck.") By emphasizing interfaces rather than specific types,
well-designed code improves its flexibility by allowing polymorphic
substitution. Duck-typing avoids tests using :func:`type` or