On Fri, 11 May 2012 10:16:42 -0400, Terry Reedy <tjre...@udel.edu> wrote: > On 5/11/2012 2:21 AM, Mark Shannon wrote: > > +1 to a pure Python version. > > Since new_class would be used rarely and not in inner loops, and (if I > understand) should mostly contain branching logic rather than looping, > speed hardly seems an issue.
Well, actually, the proposed new email policy is doing dynamic class construction for any header accessed by the application, which could potentially be every header in every message processed by an application if refold_source is set true. That's not quite an "inner loop", but it isn't an outer one either. That said, the header parsing logic that is also invoked by the process of returning a header under the new policy is going to outweigh the class construction overhead, I'm pretty sure. --David _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com