bpo-37053: handle strings like u"bar" correctly in Tools/parser/unparse.py (GH-13583)



Constant.kind is added in https://bugs.python.org/issue36280.
Current possible values for Constant.kind are "u" or None.

For r'bar' and b'bar', Constant.kind value is None, so there's no need
for special handling.


https://bugs.python.org/issue37053
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 385902e..a5cc000 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -399,6 +399,8 @@
         elif value is ...:
             self.write("...")
         else:
+            if t.kind == "u":
+                self.write("u")
             self._write_constant(t.value)
 
     def _List(self, t):