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?

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 2016-01-06 14:45 +0000
Message-ID <mailman.31.1452091523.2305.python-list@python.org> (permalink)
References <bd94920f139af986c1a304f5ce844f9d@kapsi.fi>

Show all headers | 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