Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'yet.': 0.04; 'mrab': 0.05; 'root': 0.05; 'tree': 0.05; 'binary': 0.07; 'nested': 0.07; 'library?': 0.09; 'python': 0.11; '2],': 0.16; 'node.': 0.16; 'subject:library': 0.16; 'typo': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'to:name:python-list@python.org': 0.22; '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; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'easy': 0.60; 'email addr:gmail.com': 0.63; 'such': 0.63; 'more': 0.64; '3-4': 0.68; 'saw': 0.77; '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 :content-type; bh=z4aD6vDHFOJU1vZEUjXusmzFVUFdizDPFQmKgH2R+uQ=; b=C/3otB/W6SdRtni7X6oyngM/MV5VnqaoJmgv+u8S5KV4YI1LjZ6t3gmd2EA+8hLIsm E2xLRHydFKWNNHeVhMgtqxhUepx6BfiJzp/a/8L6+/tnXi8P9AzXzByVoUxUsKJhN037 lsdKt4mQl3RpbXGtK0Ii5y8LZ8CDkJsPJWvaipuNl4EKjF56KBh8I+mV3NZqf5RMVD6V QFwKJewy8uDr4jdpWEqw1nOJKGwsDwYM95Llnk1JV3lxdzDmU2ys/IWSs+oDBYrPjGu3 dCHWIHRvsxC4ustPeEDD/o4uitOfjW2TUBw46NqhNlFvTkBiidUb/cpctuRlFIARdPgA Voaw== MIME-Version: 1.0 X-Received: by 10.58.210.39 with SMTP id mr7mr4671191vec.18.1386877219067; Thu, 12 Dec 2013 11:40:19 -0800 (PST) In-Reply-To: <52AA10A2.4060302@mrabarnett.plus.com> References: <52A9FD0A.9080804@gmail.com> <52AA10A2.4060302@mrabarnett.plus.com> Date: Thu, 12 Dec 2013 14:40:19 -0500 Subject: Re: Tree library - multiple children From: Joel Goldstick To: "python-list@python.org" Content-Type: multipart/alternative; boundary=047d7bd6c5d0fd5ed504ed5b8324 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: 124 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386877642 news.xs4all.nl 2907 [2001:888:2000:d::a6]:34129 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61748 --047d7bd6c5d0fd5ed504ed5b8324 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Dec 12, 2013 at 2:38 PM, MRAB wrote: > On 12/12/2013 19:30, Joel Goldstick wrote: > >> On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti > > wrote: >> >> On 2013-12-12, Ricardo Ar=C3=A1oz > > 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: >> >> I think that was a typo for "typo". :-) OMG! I saw that too! > > > [[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. >> >> > -- > https://mail.python.org/mailman/listinfo/python-list > --=20 Joel Goldstick http://joelgoldstick.com --047d7bd6c5d0fd5ed504ed5b8324 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Thu, Dec 12, 2013 at 2:38 PM, MRAB <python@mrabarnett.= plus.com> wrote:
On 12/12/2013 19:30, Joel = Goldstick wrote:
On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <neilc@norwich.edu
<mailto:neilc@nor= wich.edu>> wrote:

=C2=A0 =C2=A0 On 2013-12-12, Ricardo Ar=C3=A1oz <ricaraoz@gmail.com
=C2=A0 =C2=A0 <mailto:ricaraoz@gmail.com>> wrote:
=C2=A0 =C2=A0 =C2=A0> I need to use a tree structure. Is there a good an= d known library?
=C2=A0 =C2=A0 =C2=A0> Doesn't have to be binary tree, I need to have= multiple children
=C2=A0 =C2=A0 per node.

=C2=A0 =C2=A0 Have you tried nested lists?

=C2=A0 =C2=A0 [[1, 2], [3, 4]

I think that was a type for this:

I think that was a typo for "typo". :-)

OMG! =C2=A0 I saw that too!


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


=C2=A0 =C2=A0 Can represent

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 root
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 / =C2=A0\
=C2=A0 =C2=A0 =C2=A0 =C2=A01-2 =C2=A0 =C2=A03-4

=C2=A0 =C2=A0 Python makes it very easy to manipulate such a structure. It<= br> =C2=A0 =C2=A0 isn't clear that you need more than that yet.


--
https://mail.python.org/mailman/listinfo/python-list



--
--047d7bd6c5d0fd5ed504ed5b8324--