Stefan Mosoi <st3f4n2...@gmail.com> added the comment:

Also 
> without having a reference to module itself

reload() just gets the name of the module

    try:
        name = module.__spec__.name
    except AttributeError:
        name = module.__name__

and then 

if sys.modules.get(name) is not module

So it might be just check if is str just skip the tranformation to string.

----------

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

Reply via email to