[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

Oren Milman report at bugs.python.org
Sat Aug 26 15:35:53 EDT 2017


Oren Milman added the comment:

on a second thought, BadSource could be a subclass of str, so maybe we
should just check whether
module_globals['__loader__'].get_source(module_globals['__name__']).splitlines()[lineno-1]
is a str,
and whether
module_globals['__loader__'].get_source(module_globals['__name__']).splitlines()
is a list.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31285>
_______________________________________


More information about the Python-bugs-list mailing list