Python Gotcha's?

rusi rustompmody at gmail.com
Fri Apr 6 00:28:01 EDT 2012


On Apr 5, 4:06 pm, Duncan Booth <duncan.bo... at invalid.invalid> wrote:
> Steven D'Aprano <steve+comp.lang.pyt... at pearwood.info> wrote:
> > JSON expects double-quote marks, not single:
> >     v = json.loads("{'test':'test'}")  fails
> >     v = json.loads('{"test":"test"}')  succeeds
>
> You mean JSON expects a string with valid JSON?
> Quelle surprise.

Are there languages (other than python) in which single and double
quotes are equivalent?

[No I dont claim to know all the languages out there, just that I dont
know any other language which allows single and double quotes to be
interconvertible like python does]



More information about the Python-list mailing list