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 string [\?] parses fine in CLoader while Loader fails to do so. Is it expected?
$ python3
Python 3.11.5 (main, Aug 24 2023, 15:18:16) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from yaml import load, CLoader, Loader
>>> load('[\?]', CLoader)
['\\?']
>>> load('[\?]', Loader)
...
File "/usr/local/lib/python3.11/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/parser.py", line 483, in parse_flow_sequence_entry
raise ParserError("while parsing a flow sequence", self.marks[-1],
yaml.parser.ParserError: while parsing a flow sequence
in "<unicode string>", line 1, column 1:
[\?]
^
expected ',' or ']', but got '?'
in "<unicode string>", line 1, column 3:
[\?]
^
The text was updated successfully, but these errors were encountered:
The string
[\?]
parses fine inCLoader
whileLoader
fails to do so. Is it expected?The text was updated successfully, but these errors were encountered: