◐ Shell
clean mode source ↗

Message 126613 - Python tracker

> Use "U" format to parse a module name, and "%R" to format a module name
> (to escape surrogates characters and add quotes, instead of 
> "... '%.200s' ...").

See also #8754: repr() is better than str() for other reasons, eg. to see a space at the end of a module name (__import__('space ')) thanks to the quotes.