This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients
Date 2006-02-22.01:34:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=6380

Here's a new version.  This adds:

- fix for copying functions in copy.py (see python-dev post)
- more unit tests
- latex docs
- docstring tweaks

I haven't got latex installed on my laptop so I can't test
whether the docs are any good.  Can anyone?

I did this on the plane so your proposal below isn't
incorporated yet.  My comment is that I actually *like*
having the functionality in the dict base class since
someone else implementing on_missing() might not need the
default_factory instance variable; subclassing defaultdict
would be kind of wrong for that purpose.

I'm not sure I understand your comment about optimizing away
PyEval_CallMethod() -- don't we still need to use that so
that a subclass can override it?  Or do you propose to do
another check for the exact defaultdict type and if so,
inline it or at least shortcut the call?  I'm not sure I see
the value in such a micro-optimization at this point --
after all it's only called for missing keys which shouldn't
be all that frequent.
History
Date User Action Args
2007-08-23 15:45:50adminlinkissue1433928 messages
2007-08-23 15:45:50admincreate