Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: mviljamaa Newsgroups: comp.lang.python Subject: How to union nested Sets / A single set from nested sets? Date: Mon, 04 Jan 2016 04:40:03 +0200 Lines: 10 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Xk10RWP8Ln2G1ZIK0Y6Efw3ZZ8mQm76pl15DEbn7Avbw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.071 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'subject:How': 0.09; 'subject:set': 0.09; "'b',": 0.16; 'received:fi': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'set,': 0.16; 'forming': 0.22; 'sets': 0.23; 'header:User-Agent:1': 0.26; "i'm": 0.30; 'i.e.': 0.35; 'skip:i 20': 0.36; 'there': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'charset:us-ascii': 0.37; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'subject: / ': 0.63; 'received:217': 0.66; 'union': 0.67; 'as:': 0.79; 'subject:Sets': 0.84 X-Sender: mviljamaa@kapsi.fi User-Agent: RoundCube Webmail/0.9.4 X-SA-Exim-Connect-IP: 217.30.184.182 X-SA-Exim-Mail-From: mviljamaa@kapsi.fi X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mail.kapsi.fi) X-Mailman-Approved-At: Wed, 06 Jan 2016 08:18:04 -0500 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101290 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']) ?