This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Oren Milman, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-08-28.06:42:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503902578.19.0.292474755081.issue31285@psf.upfronthosting.co.za>
In-reply-to
Content
An alternative solution is using str.splitlines(source) instead of source.splitlines(). It raises a TypeError if the argument is not a text string and always returns a list of strings.

According to the documentation get_source() must return a text string or None.

https://docs.python.org/3/library/importlib.html?highlight=get_source#importlib.abc.InspectLoader.get_source
History
Date User Action Args
2017-08-28 06:42:58serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, eric.snow, Oren Milman
2017-08-28 06:42:58serhiy.storchakasetmessageid: <1503902578.19.0.292474755081.issue31285@psf.upfronthosting.co.za>
2017-08-28 06:42:58serhiy.storchakalinkissue31285 messages
2017-08-28 06:42:57serhiy.storchakacreate