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


Groups > comp.lang.python > #61744

Re: Tree library - multiple children

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@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; 'yet.': 0.04; 'root': 0.05; 'tree': 0.05; 'binary': 0.07; 'nested': 0.07; 'library?': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2],': 0.16; 'node.': 0.16; 'subject:library': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'email addr:gmail.com&gt;': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; '&gt;': 0.26; 'this:': 0.26; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; "doesn't": 0.30; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'lists?': 0.31; 'url:python': 0.33; 'received:google.com': 0.35; 'there': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'clear': 0.37; 'represent': 0.38; 'pm,': 0.38; '12,': 0.39; 'url:mail': 0.40; 'easy': 0.60; 'such': 0.63; 'more': 0.64; '3-4': 0.68; 'joel': 0.91; '2013': 0.98
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:to :cc:content-type; bh=n50iMaRM7gW5JOj2Gmh6OocnDDZwtbz2p7uVvnTtuGc=; b=WCTvQCeBJzmYBZjHjycoh9v5cDd7Amk5sca4WlhAd3A9EPzL3hqHIzXFRPkmfX7OHR RtP+X4c3CD+bQYPRSU267x+O4X3CI8ORyzpPqcJ838cC7YLgOmDIv/mzudwDvefBgf76 IHoByf9E2RXTCkguUy7ctj3BRiUnal5Au48wUQGMffjeJMzbLAgN4JY3xznUiOMuBMu5 06yqUW21RK8IsJMFK3ul93Vve0UaoT0izaglkC9YvneNlCPp0B4Smy9jdqmEtlucBU7y Tf68QtgY5d2dYTFvWrmx+Iagf3BmIjqmSOKogojkH+JT2+psNJhwACNBnof4diDsHYnF fRCg==
MIME-Version 1.0
X-Received by 10.220.19.134 with SMTP id a6mr713581vcb.36.1386876611650; Thu, 12 Dec 2013 11:30:11 -0800 (PST)
In-Reply-To <l8d2m1$ql$1@ger.gmane.org>
References <52A9FD0A.9080804@gmail.com> <l8d2m1$ql$1@ger.gmane.org>
Date Thu, 12 Dec 2013 14:30:11 -0500
Subject Re: Tree library - multiple children
From Joel Goldstick <joel.goldstick@gmail.com>
To Neil Cerutti <neilc@norwich.edu>
Content-Type multipart/alternative; boundary=001a11c3ae1cc9314b04ed5b5f80
Cc "python-list@python.org" <python-list@python.org>
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4015.1386876619.18130.python-list@python.org> (permalink)
Lines 89
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386876619 news.xs4all.nl 2847 [2001:888:2000:d::a6]:51870
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61744

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <neilc@norwich.edu> wrote:

> On 2013-12-12, Ricardo Aráoz <ricaraoz@gmail.com> wrote:
> > I need to use a tree structure. Is there a good and known library?
> > Doesn't have to be binary tree, I need to have multiple children per
> node.
>
> Have you tried nested lists?
>
> [[1, 2], [3, 4]
>

I think that was a type for this:

[[1, 2], [3, 4]]


>
> Can represent
>
>      root
>      /  \
>   1-2    3-4
>
> Python makes it very easy to manipulate such a structure. It
> isn't clear that you need more than that yet.
>
> --
> Neil Cerutti
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com

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


Thread

Re: Tree library - multiple children Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-12 14:30 -0500

csiph-web