On Thursday, April 5, 2012 11:28:01 PM UTC-5, rusi wrote: > On Apr 5, 4:06 pm, Duncan Booth <duncan.bo...@invalid.invalid> wrote: > > Steven D'Aprano <steve+comp.lang.pyt...@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?
Fortran 90 and more recent versions. > > [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] On Thursday, April 5, 2012 11:28:01 PM UTC-5, rusi wrote: > On Apr 5, 4:06 pm, Duncan Booth <duncan.bo...@invalid.invalid> wrote: > > Steven D'Aprano <steve+comp.lang.pyt...@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] -- http://mail.python.org/mailman/listinfo/python-list