Draft PEP on RSON configuration file format
robert.kern at gmail.com
Tue Mar 2 19:39:10 CET 2010
On 2010-03-02 11:59 AM, Terry Reedy wrote:
> On 3/2/2010 11:34 AM, Robert Kern wrote:
>> 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),
>>>> 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
>>> 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().
> >>> eval(1)
> creates and objects and discards it, with a net result of 'pass'.
> What do you think I am missing.
x = eval('1')
> It's reasonably well-accepted that
>> JSON is very close to being a subset of Python's expression syntax with
>> just a few modifications.
> a subset of Python's object notation (number and string literals and
> list and dict displays (but not set displays), and three named
> constants). Without operators, it barely qualifies, to me, even as
> 'expression syntax'.
Literal expression syntax, then.
"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