Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43798

Re: Atoms, Identifiers, and Primaries

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'json': 0.07; 'string': 0.09; 'converted': 0.09; 'definition,': 0.09; 'identifier': 0.09; '"."': 0.16; '(it': 0.16; '::=': 0.16; 'arbitrarily': 0.16; 'attributeref': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'janssen': 0.16; 'reliably': 0.16; 'typedef': 0.16; 'valid.': 0.16; 'elements': 0.16; 'so.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'translated': 0.19; '>>>': 0.22; 'bruce': 0.22; "aren't": 0.24; 'circular': 0.24; 'primary': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'keys': 0.31; 'though.': 0.31; 'comment': 0.34; 'skip:d 20': 0.34; "can't": 0.35; 'definition': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'words,': 0.36; 'ends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; 'simple': 0.61; 'back': 0.62; 'between': 0.67; 'stated': 0.69; '(ie': 0.84; '5.3.1': 0.84; 'technically': 0.84; 'valid,': 0.84; 'rusi': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=6fAuVDbCqr4C/HmoCGtdwzrJiBIAxI22Ilvpq1D/VVI=; b=m38+KokFjS9gPnDMPntFa0CxAc0U92ctmiVa9KwQEHiFIQ/duFcW4dnZk3TCZ59xB0 eMS7P/M7wM4eW+Myd6bt5Caf8L1Dq1bHrsYGZ1hNZmgrRU6GO2wQ/mbiEUpGz7NbTHSt z7qHauDVCRcYpBG8TEWN0dGhltBz4ZV5zFKSTv9PdWroEodI7KS3njBjyLQBZYz5ndS1 rhR09EX9DAuDR3/fk4XhM3oVlfVurSOPXm+uKiPjM6/Tc4zZryxzjST3xXPTkKxI+tRj g09rwxCkVLz1e8M3HniHAm/ONsAYekqctkPtX/6azaBbami2gkjEzGILrMbcwleudUUJ ClpQ==
MIME-Version 1.0
X-Received by 10.58.75.46 with SMTP id z14mr6712538vev.52.1366250210136; Wed, 17 Apr 2013 18:56:50 -0700 (PDT)
In-Reply-To <CAMjeLr9Z9f1y1NyLs44UqGYrnEEpABxouB4pr=xaaOdB-+HfLA@mail.gmail.com>
References <66e78281-542b-41b3-a56d-04bf736d1e0a@googlegroups.com> <14a9ca59-218d-4dec-9e03-b7ac6b92d378@af5g2000pbd.googlegroups.com> <CAMjeLr9Z9f1y1NyLs44UqGYrnEEpABxouB4pr=xaaOdB-+HfLA@mail.gmail.com>
Date Thu, 18 Apr 2013 11:56:50 +1000
Subject Re: Atoms, Identifiers, and Primaries
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.749.1366250219.3114.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366250219 news.xs4all.nl 2175 [2001:888:2000:d::a6]:39269
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43798

Show key headers only | View raw


On Thu, Apr 18, 2013 at 9:40 AM, Mark Janssen <dreamingforward@gmail.com> wrote:
> On Tue, Apr 16, 2013 at 8:55 PM, rusi <rustompmody@gmail.com> wrote:
>> On Apr 17, 7:57 am, Bruce McGoveran <bruce.mcgove...@gmail.com> wrote:
>>> 3.  Section 5.3.1 offers this definition of an attributeref:
>>>     attributeref ::= primary "." identifier
>>>
>>
>> One general comment I will make is regarding your distress at what you
>> call 'circular'
>> Circular just means recursive and recursion is the bedrock for
>> language-design.
>
> Rercursion the "bedrock" of language-design.  I don't think so.  From
> what I know, a well-defined language ends at its symbols.  It makes no
> use of "infinities".

There's a difference between infinite and recursive, though. I was
defining a function (it converted from JSON to an internal format) and
wanted to explain that not all of JSON would reliably round-trip (ie
be able to be translated to the internal format and then back again).
To describe what _would_ round-trip correctly, I used this simple yet
technically illegal description:

typedef valid string|array(valid)|object(string:valid)

In other words, a string is valid, and a list/array of valid elements
is valid, and a dictionary/mapping/object with string keys and valid
elements is valid. It's a recursive definition, but it can't go
infinite (self-references aren't valid - though this isn't stated by
the typedef); however, it can go arbitrarily deep.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Atoms, Identifiers, and Primaries Bruce McGoveran <bruce.mcgoveran@gmail.com> - 2013-04-16 19:57 -0700
  Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-16 20:55 -0700
    Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 16:40 -0700
      Re: Atoms, Identifiers, and Primaries alex23 <wuwei23@gmail.com> - 2013-04-17 17:29 -0700
        Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 17:41 -0700
        Re: Atoms, Identifiers, and Primaries Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 02:04 +0100
      Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-18 00:40 -0700
    Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 18:33 -0600
      Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-18 02:14 +0000
        Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 21:12 -0600
    Re: Atoms, Identifiers, and Primaries Mark Janssen <dreamingforward@gmail.com> - 2013-04-17 18:04 -0700
    Re: Atoms, Identifiers, and Primaries Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-18 02:08 +0100
    Re: Atoms, Identifiers, and Primaries Chris Angelico <rosuav@gmail.com> - 2013-04-18 11:56 +1000
    Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 21:10 -0600
  Re: Atoms, Identifiers, and Primaries Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-17 01:21 -0600
    Re: Atoms, Identifiers, and Primaries 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-17 21:29 -0700
    Re: Atoms, Identifiers, and Primaries 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-17 21:29 -0700
  Re: Atoms, Identifiers, and Primaries Dave Angel <davea@davea.name> - 2013-04-17 07:07 -0400
  Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-17 11:43 +0000
  Re: Atoms, Identifiers, and Primaries Bruce McGoveran <bruce.mcgoveran@gmail.com> - 2013-04-17 10:15 -0700
    Re: Atoms, Identifiers, and Primaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-18 04:43 +1000
      Re: Atoms, Identifiers, and Primaries rusi <rustompmody@gmail.com> - 2013-04-18 10:04 -0700

csiph-web