Draft PEP on RSON configuration file format

Robert Kern robert.kern at gmail.com
Tue Mar 2 11:34:51 EST 2010


On 2010-03-01 22:55 PM, Terry Reedy wrote:
> On 3/1/2010 7:56 PM, Patrick Maupin wrote:
>> On Mar 1, 5:57 pm, Erik Max Francis<m... at alcyone.com> wrote:
>>> Patrick Maupin wrote:
>>> This not only seriously stretching the meaning of the term "superset"
>>> (as Python is most definitely not even remotely a superset of JSON), but
>>
>> Well, you are entitled to that opinion, but seriously, if I take valid
>> JSON, replace unquoted true with True, unquoted false with False,
>> replace unquoted null with None, and take the quoted strings and
>> replace occurrences of \uXXXX with the appropriate unicode, then I do,
>> in fact, have valid Python. But don't take my word for it -- try it
>> out!
>
> To me this is so strained that I do not see why why you are arguing the
> point. So what? The resulting Python 'program' will be equivalent, I
> believe, to 'pass'. Ie, construct objects and then discard them with no
> computation or output.

Not if you eval() rather than exec(). It's reasonably well-accepted that JSON is 
very close to being a subset of Python's expression syntax with just a few 
modifications.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list