On 08/10/2013 19:02, Yuriy Taraday wrote:
On Fri, Sep 13, 2013 at 10:40 PM, Antoine Pitrou <solip...@pitrou.net
<mailto:solip...@pitrou.net>> wrote:


    Hello,

    Following the python-dev discussion, I've written a PEP to recap the
    proposal and the various arguments. It's inlined below, and it will
    probably appear soon at http://www.python.org/dev/peps/pep-0455/, too.

    Regards

    Antoine.


Hello.

Overall I think that's a great idea.
Here are some questions on it though. I'm sorry if some of these have
already been discussed in some other thread.

1. Thread safety.

PEP doesn't mention anything about thread safety while the
implementation proposed in the tracker is (very) not thread-safe. I
think, PEP should mention that this class have no guarantees.

2. Extra dict.

There should be a way to avoid creation of the second dict when there is
no need to store original keys. For example, email.message module
doesn't store original headers as they are not needed. The same applies
to web frameworks parsing HTTP headers or WSGI environment.

If you don't need the original key, then you might as well just use a
transform function with a dict.

I'm sure I had another one. I'll send it once I remember.


_______________________________________________
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