mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
#3214 followup: add link to ABC entry.
This commit is contained in:
parent
692b3f8035
commit
8a1c2543ff
1 changed files with 3 additions and 3 deletions
|
|
@ -160,9 +160,9 @@ Glossary
|
|||
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
|
||||
:func:`isinstance`. (Note, however, that duck-typing can be complemented
|
||||
with abstract base classes.) Instead, it typically employs :func:`hasattr`
|
||||
tests or :term:`EAFP` programming.
|
||||
:func:`isinstance`. (Note, however, that duck-typing can be complemented
|
||||
with :term:`abstract base class`\ es.) Instead, it typically employs
|
||||
:func:`hasattr` tests or :term:`EAFP` programming.
|
||||
|
||||
EAFP
|
||||
Easier to ask for forgiveness than permission. This common Python coding
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue