Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #37715
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'python': 0.09; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; '2.7.3': 0.16; 'curious.': 0.16; 'received:80.91.229.3': 0.16; 'received:net24.it': 0.16; 'received:plane.gmane.org': 0.16; 'subject:object': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'maybe': 0.29; 'turns': 0.33; 'to:addr:python-list': 0.33; 'false': 0.35; 'received:org': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'more': 0.63; 'jul': 0.65 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Vito De Tullio <vito.detullio@gmail.com> |
| Subject | Re: Retrieving an object from a set |
| Date | Sat, 26 Jan 2013 08:55:50 +0100 |
| References | <CAJ6cK1b=F5JXL=FN0qouS-idbE8xnVURm0ZZrZ8-DW2xbLNErg@mail.gmail.com> <51031922.2020104@mrabarnett.plus.com> <CALwzid=YsWTow=0E=_spexS1JFagPtPgBUi-ksDCfByLE8Kc7A@mail.gmail.com> <510345FA.5000607@mrabarnett.plus.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Gmane-NNTP-Posting-Host | adsl-ull-237-248.45-151.net24.it |
| User-Agent | KNode/4.9.4 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.1069.1359186965.2939.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1359186965 news.xs4all.nl 6870 [2001:888:2000:d::a6]:58543 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:37715 |
Show key headers only | View raw
MRAB wrote:
> It turns out that both S & {x} and {x} & S return {x}, not {y}.
curious.
$ python
Python 2.7.3 (default, Jul 3 2012, 19:58:39)
[GCC 4.7.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = (1,2,3)
>>> y = (1,2,3)
>>> s = set([y])
>>> (s & set([x])).pop() is y
False
>>> (set([x]) & s).pop() is y
True
maybe it's implementation-defined?
--
ZeD
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Retrieving an object from a set Vito De Tullio <vito.detullio@gmail.com> - 2013-01-26 08:55 +0100
csiph-web