Fix handling of double braces in f-strings, after bpo-29104 implementation

Merged Yannick Jadoul requested to merge topic/py3.6/fix-fstring-double-braces into branch/py3.6

Sorry it took so long, but here's the fix for what I broke in !736 (merged) (implementing

I forgot to take the # Differs from CPython: this version handles double-braces on its own. comment into account, and the final slice instead of the StringBuilder returned double braces rather than reducing them to a single brace.

This MR should reasonably cleanly fix this.

Alternatively, it is also possible to create an implementation closer to CPython (returning a value from fstring_find_literal whether another literal part is following: cfr.

Merge request reports