At 08:49 PM 3/14/2007 +1300, Greg Ewing wrote: >Talin wrote: > > It does not need to implement the full dictionary interface; > > only the ability to insert items and retrieve them are > > required. (Note: double check that this is true). > >Deletion ability might be required as well, in case >del is used in the class body.
Right, and some weird metaclasses might only need the ability to set, or only the ability to get. (Actually, 90%+ of today's classes could get by with just setting, and no getting or deleting.) So the subset required is determined entirely by what the class body (and metaclass __new__) require. It should probably be noted that type.__new__ is still going to want a *real* dictionary, which it will then proxy. So the metaclass' __new__ is going to need to read out the contents of the pseudo-dict somehow, or generate alternative contents. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
