Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'mrab': 0.05; 'json': 0.07; 'parser': 0.07; 'decodes': 0.09; 'spec': 0.09; 'subject:using': 0.09; 'subset': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'former,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'latter,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; "python's": 0.19; 'value.': 0.19; 'cc:addr:python.org': 0.22; 'question': 0.24; 'cc:2**0': 0.24; 'define': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'primarily': 0.30; 'message-id:@mail.gmail.com': 0.30; 'sep': 0.31; 'compatible': 0.32; 'guess': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'being': 0.38; 'new': 0.61; 'simply': 0.61; 'guarantee': 0.63; 'therefore,': 0.64; 'more': 0.64; 'guaranteed': 0.75; "'true'": 0.84; '(ie': 0.84; "it'd": 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=+zjtokm7DPbtUndbop4/j8nSmsQHesLVPDwRV+/IEP8=; b=zKNfCbbvMR7txHIqA3vZ59XWXimEs/+Wj6TmTiGXzgO34MQ5U/3ZfBanXCaVRDQPyD wqeBMlG8YRHQDuET3MHpE3wlcPvuocDswDhM/CaEqp93vAnSoAwHJv4F6Bk3h4byJP4P DMI5QoH2Sp0G9LmoseCyVYeoC61wzLLUdB6K+Xw9nb/wUOI+JMsMuV6U7Fu3aZdPML41 e7YUt8xwLAQd4++lqIJIcylLcnrcWrhJtDwZmVM3gKa/CI9uNq8bpZi+2jJ6nXdSiNEr GSb4avP8zgnbDSIstfasSiRRjif/G20/Tu10Cx1Gm/lv4P/nZteaGW+Rt4bHT5dpouJ7 3tOA== MIME-Version: 1.0 X-Received: by 10.50.176.202 with SMTP id ck10mr9216488igc.2.1409962807203; Fri, 05 Sep 2014 17:20:07 -0700 (PDT) In-Reply-To: <5409ED0B.2030902@mrabarnett.plus.com> References: <46e782a5-b087-4f95-aadb-26e233bf5419@googlegroups.com> <5407A69B.3030707@mrabarnett.plus.com> <5409ED0B.2030902@mrabarnett.plus.com> Date: Sat, 6 Sep 2014 10:20:07 +1000 Subject: Re: Storing instances using jsonpickle From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409962816 news.xs4all.nl 2965 [2001:888:2000:d::a6]:35242 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77627 On Sat, Sep 6, 2014 at 3:04 AM, MRAB wrote: > JSON has 'true' and 'false'. > > Python has 'True' and 'False'. > > Therefore, if you want it to be able to drop it into Python's REPL, it > won't be compatible with JSON anyway! (Well, not unless you define > 'true' and 'false' first.) This is a new spec, so I guess the question is whether it's primarily "JSON with some more features" or "subset of Python syntax in the same way that JSON is a subset of JS". If it's the former, then yes, it'd use "true" and "false", and you'd have to define them; but if the latter, the spec would simply use "True" and "False". But being able to guarantee that JSON decodes correctly with this parser (ie make it a guaranteed superset of JSON) would be of value. ChrisA