News for hackers. Stuff that matters.
Re:Python 3.6.0 released by mixmastamyk on Friday December 23, 2016 @04:01PM (#13247213)
The guy that implemented it (Eric) said that it is largely syntactic-sugar where the byte compiler splits the string and converts it into a format(string, args) call. Therefore it gets exactly/only what it needs.

It is true that I've never inspected the C code implementation myself, but I took him at his word.

load_name looks like it read foo, then format_value did format('{}', foo).

I didn't realize it before, but it looks like it might have better performance.

Re:Python 3.6.0 released by emidln on Friday December 23, 2016 @04:27PM (#13247302)
That was the original implementation, AFAICT from reading the ticketing. FORMAT_VALUE was introduced to fix a slight inconsistency where someone might monkey with str.format(). While doing so, it was mentioned that there was a slight performance improvement to fewer lookups. See here for more info: https://bugs.python.org/issue25483
Re:Python 3.6.0 released by mixmastamyk on Friday December 23, 2016 @04:38PM (#13247344)
That's ringing a bell now, the implementation has some elegance to it.