~ubuntu-branches/ubuntu/oneiric/python2.6/oneiric

« back to all changes in this revision

Viewing changes to Doc/glossary.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-08-07 20:03:08 UTC
  • mfrom: (10.1.27 sid)
  • Revision ID: james.westby@ubuntu.com-20100807200308-bwsyymoc4donr9a9
Tags: 2.6.6~rc1-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
      must be a duck.")  By emphasizing interfaces rather than specific types,
161
161
      well-designed code improves its flexibility by allowing polymorphic
162
162
      substitution.  Duck-typing avoids tests using :func:`type` or
163
 
      :func:`isinstance`. (Note, however, that duck-typing can be complemented
164
 
      with abstract base classes.) Instead, it typically employs :func:`hasattr`
165
 
      tests or :term:`EAFP` programming.
 
163
      :func:`isinstance`.  (Note, however, that duck-typing can be complemented
 
164
      with :term:`abstract base class`\ es.)  Instead, it typically employs
 
165
      :func:`hasattr` tests or :term:`EAFP` programming.
166
166
 
167
167
   EAFP
168
168
      Easier to ask for forgiveness than permission.  This common Python coding