Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5376
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.023 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'sun,': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'element,': 0.16; 'set,': 0.16; 'set;': 0.16; 'subject:Converting': 0.16; 'subject:set': 0.16; 'subject:list': 0.22; 'header:In-Reply-To:1': 0.22; 'itself.': 0.22; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'set.': 0.23; 'chris': 0.27; 'message- id:@mail.gmail.com': 0.28; 'probably': 0.30; 'list': 0.30; 'to:addr:python-list': 0.32; 'another': 0.32; 'creates': 0.33; 'reference': 0.34; 'change': 0.34; 'received:209.85': 0.37; 'received:google.com': 0.38; 'received:209.85.214': 0.39; 'set': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; "it's": 0.40; 'header:Received:5': 0.40; '2011': 0.62; '12:14': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=GbY7oL+jWu9RYVTnk5Wd4NEmES6YQPISfHzAquBL2KU=; b=rPzx3u7aAktguR+f5ZPnf5HGOE9l0EiEZk+0RcYWKXUJjU7KaRUvoxYe29I0n+ZiTt fLItHPzmDL80EnbSur4EyyAMM+X9+prxLxMXRWjVWeloXfn2N7/azi2T14dV7rBmNcRg qxytMu4gBPaaZitoz0DzA5UUDOY6X+dZQxs+g= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XX8XQyvWYABsbOtgKBkuSaOlwfuBt+xUEco04TKw2SpDkBSc4ns9DUmYKlZc+uElte ktVVVEeFYm9D0ciwYIJAwdDGzdjSMa6dG678I4tbdq/nErX+stc7BnFk1xU0ktRzU3Sd Lhk50hfPZXdhBZuYS68EBq8eT2jzXs1+Srit4= |
| MIME-Version | 1.0 |
| In-Reply-To | <iqm2oi$u60$1@speranza.aioe.org> |
| References | <iqlgj4$iet$1@speranza.aioe.org> <mailman.1543.1305365545.9059.python-list@python.org> <iqm2oi$u60$1@speranza.aioe.org> |
| Date | Sun, 15 May 2011 04:22:33 +1000 |
| Subject | Re: Converting a set into list |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1553.1305397356.9059.python-list@python.org> (permalink) |
| Lines | 14 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1305397356 news.xs4all.nl 34849 [::ffff:82.94.164.166]:53240 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:5376 |
Show key headers only | View raw
On Sun, May 15, 2011 at 12:14 AM, TheSaint <nobody@nowhere.net.no> wrote:
> newset= set(myset1) & set(myset2)
> list= [newset]
>
> << [{'bla', 'alb', 'lab'}]
>
> Probably list(set) is not like [set].
list(set) creates a list out of the set. [set] creates a list with one
element, the set itself. It's not a copy of the set, it's another
reference to the same set; change one and you'll see the change in the
other.
Chris Angelico
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-14 17:02 +0800
Re: Converting a set into list Peter Otten <__peter__@web.de> - 2011-05-14 11:33 +0200
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-14 22:14 +0800
Re: Converting a set into list Chris Angelico <rosuav@gmail.com> - 2011-05-15 04:22 +1000
Re: Converting a set into list Ben Finney <ben+python@benfinney.id.au> - 2011-05-15 00:12 +1000
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-14 22:51 +0800
Re: Converting a set into list Ben Finney <ben+python@benfinney.id.au> - 2011-05-15 09:21 +1000
Re: Converting a set into list Chris Torek <nospam@torek.net> - 2011-05-15 02:11 +0000
Re: Converting a set into list SigmundV <sigmundv@gmail.com> - 2011-05-15 04:18 -0700
Re: Converting a set into list SigmundV <sigmundv@gmail.com> - 2011-05-15 04:23 -0700
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-15 23:56 +0800
Re: Converting a set into list Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-05-15 22:27 +0200
Re: Converting a set into list Daniel Kluev <dan.kluev@gmail.com> - 2011-05-16 13:37 +1100
Re: Converting a set into list Peter Otten <__peter__@web.de> - 2011-05-16 08:34 +0200
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-16 22:23 +0800
Re: Converting a set into list Ben Finney <ben+python@benfinney.id.au> - 2011-05-17 10:33 +1000
Re: Converting a set into list Roy Smith <roy@panix.com> - 2011-05-15 13:07 -0400
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-16 00:05 +0800
Re: Converting a set into list Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-15 16:28 +0000
Re: Converting a set into list TheSaint <nobody@nowhere.net.no> - 2011-05-16 00:35 +0800
Re: Converting a set into list Duncan Booth <duncan.booth@invalid.invalid> - 2011-05-16 10:24 +0000
Re: Converting a set into list Chris Torek <nospam@torek.net> - 2011-05-17 01:07 +0000
csiph-web