Le Tue, 8 Oct 2013 08:21:43 +0200,
Antoine Pitrou <solip...@pitrou.net> a écrit :
> 
> > I think there *is* a potentially worthwhile generalisation here,
> > but I'm far from sure "is-a-dict" is the right data model - for
> > composability reasons, it feels like a "has-a" relationship with an
> > underlying data store may make more sense.
> 
> It doesn't work. Your "underlying mapping" can show too much variation
> for the wrapper/proxy to have sane semantics. For example, how do you
> combine with a defaultdict or a WeakKeyDictionary, knowing that the
> wrapper/proxy has to have its own internal mapping as well?

(for the record, I'm saying that because I did try the composition
route.)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to