Serhiy Storchaka added the comment:

Nice idea, Antti. But I tried to implement it, and surprisingly found that this 
approach is slower than FORMAT_VALUE + BUILD_STRING. At least for this 
particular example. Perhaps because we can't use a stack and need to allocate a 
new tuple containing literal strings and formatted values for PyUnicode_Join(). 
Not mentioning that the code is much more complex.

Here is updated previous patch with fixed leak.

----------
Added file: http://bugs.python.org/file43735/fstring_build_string_2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27078>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to