Saiyang Gou <gousaiyang...@gmail.com> added the comment:
I think it might be a good idea to just strip leading spaces and tabs for `compile(x, ..., 'eval')` if we want consistent behavior. `compile` might be used in more locations in the whole Python source tree apart from `typing.get_type_hints`. Technically the only behavior difference between `eval(x)` and `compile(x, ..., 'eval')` (when `x` is a string) should be that the latter one does not execute the generated byte code. ---------- nosy: +gousaiyang _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43893> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com