[Python-Dev] PEP 455: TransformDict

Yuriy Taraday yorik.sar at gmail.com
Tue Oct 8 20:02:43 CEST 2013


On Fri, Sep 13, 2013 at 10:40 PM, Antoine Pitrou <solipsis at 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.

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

-- 

Kind regards, Yuriy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131008/d3f648af/attachment.html>


More information about the Python-Dev mailing list