Serhiy Storchaka <[email protected]> added the comment:
I can reproduce this problem when use double quotes as both outer and internal
quotes.
$ echo -n '{"A":"a"}' | python3 -c "import sys,json; j=json.load(sys.stdin);
print(j["A"])"
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'A' is not defined
This has not relation to Python, this is how the quoting in the shell works.
Perhaps something in your configuration makes single quotes be interpreted as
double quotes.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34874>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com