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


Groups > comp.lang.python > #101302

Re: How to union nested Sets / A single set from nested sets?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
Newsgroups comp.lang.python
Subject Re: How to union nested Sets / A single set from nested sets?
Date Wed, 6 Jan 2016 14:45:01 +0000
Lines 13
Message-ID <mailman.31.1452091523.2305.python-list@python.org> (permalink)
References <bd94920f139af986c1a304f5ce844f9d@kapsi.fi>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de D/DxixTFapm7+AfoipH0pQoe5KvW6hKODh+YrBYgYOxA==
Return-Path <oscar.j.benjamin@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.027
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'subject:How': 0.09; 'subject:set': 0.09; "'b',": 0.16; '2016': 0.16; 'cc:name:python list': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'set,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'forming': 0.22; 'sets': 0.23; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; "i'm": 0.30; 'getting': 0.33; 'received:google.com': 0.35; 'i.e.': 0.35; 'skip:i 20': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'january': 0.38; 'received:209': 0.38; 'subject:from': 0.39; 'where': 0.40; 'subject: / ': 0.63; 'union': 0.67; 'as:': 0.79; 'oscar': 0.84; 'subject:Sets': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=U+i1s56RtC+12v1qwpRKq7+twVXudzuTbJjX9rMOZWw=; b=uPUGyiS2jXqYujGSKlRx2c/lwjlRBkW4ohjURUs8Ur9zZ55XqdzPJeEo1yUr3xV5Zz L1WvWxeh0YSOIivve664QgmAtqwI1GpagaF/tbdN+yek9XoGYBRN4Q/toFj269Xl5pah 9xADrAlZQqfL0Sq2l6sTQ3LAYIbIrnsxnaJIpWrCGWfGCgMDBzkbTcEX1oNIhRRpZhVh 5iblouqRRlNpRAWmorE42+tQVkW97ebzgsCynXe3lhnUgbeh8dhqbfyYKpuYtTdQHVTD gx8RdwH/XKK1a3Wcx3ge7hfa0RjxDw0cZqsX6RJYJvh0k+CF2jQH2aYuqm/B9tK1O+7L 4myw==
X-Received by 10.112.181.196 with SMTP id dy4mr19070810lbc.42.1452091520797; Wed, 06 Jan 2016 06:45:20 -0800 (PST)
In-Reply-To <bd94920f139af986c1a304f5ce844f9d@kapsi.fi>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:101302

Show key headers only | View raw


On 4 January 2016 at 02:40, mviljamaa <mviljamaa@kapsi.fi> wrote:
> I'm forming sets by set.adding to sets and this leads to sets such as:
>
> Set([ImmutableSet(['a', ImmutableSet(['a'])]), ImmutableSet(['b', 'c'])])
>
> Is there way union these to a single set, i.e. get
>
> Set(['a', 'b', 'c'])

Where are you getting Set and ImmutableSet from? Is that sympy or something?

--
Oscar

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


Thread

Re: How to union nested Sets / A single set from nested sets? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-01-06 14:45 +0000
  Re: How to union nested Sets / A single set from nested sets? Steven D'Aprano <steve@pearwood.info> - 2016-01-07 19:37 +1100
    Re: How to union nested Sets / A single set from nested sets? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-01-07 15:19 +0000

csiph-web