You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code illustrates an issue in redbaron 0.9.2 where it fails to parse unicode literals
importtextwrapimportredbaron# This works properlytext=textwrap.dedent(
''' p1, p2 = (1, 2) ''').strip('\n')
red=redbaron.RedBaron(text)
# But this fails when we use unicode symbols for identifierstext=textwrap.dedent(
''' ρ1, ρ2 = (1, 2) ''').strip('\n')
red=redbaron.RedBaron(text)
# Still fails with a single unicdoe elementtext=textwrap.dedent(
''' ρ2 = 2 ''').strip('\n')
red=redbaron.RedBaron(text)
# Still fails with different unicode identifiers even with explicit# unicode literal futurestext=textwrap.dedent(
''' from __future__ import unicode_literals θ = 2 ''').strip('\n')
red=redbaron.RedBaron(text)
Essentially, using a unicode character should be valid for a variable name in Python 3, but redbaron does not seem to play nicely with that case.
# System informationimportsysprint('sys.version_info = {!r}'.format(sys.version_info))
importubeltasub_=ub.cmd('pip list | grep redbaron', shell=True, verbose=1)
The following code illustrates an issue in redbaron 0.9.2 where it fails to parse unicode literals
Essentially, using a unicode character should be valid for a variable name in Python 3, but redbaron does not seem to play nicely with that case.
Results in:
The text was updated successfully, but these errors were encountered: