Re: [Python-Dev] PEP 455: TransformDict

2013年9月15日 06:16:36 -0700

15.09.13 14:23, Antoine Pitrou написав(ла):
On 2013年9月15日 13:56:26 +0900
Larry Hastings <[email protected]> wrote:
On 09/14/2013 07:30 PM, Antoine Pitrou wrote:
On 2013年9月14日 14:33:56 +0900
Larry Hastings <[email protected]> wrote:
Whenever I read a discussion about the dict, I always wonder whether the
same thing applies to a set. Have you considered the utility of a
TransformSet? Or is it YAGNI?
Well, a TransformSet is like a normal dict, you just need to call the
transformation function yourself when inserting the keys.
s/normal dict/normal set/
No, read my example.
A TransformDict is like a normal dict, you just need to call the transformation function yourself when inserting the keys and insert a pair of (orig_key, value), or is like two normal dicts, you just need to call the transformation function yourself when inserting the keys and update parallel mapping from transformed keys to original keys.
_______________________________________________
Python-Dev mailing list
[email protected]
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