Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'variables': 0.07; 'lawrence': 0.09; 'received:internal': 0.09; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'umpteen': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'version.': 0.19; 'header:In-Reply- To:1': 0.27; "doesn't": 0.30; 'fastest': 0.30; "i'm": 0.30; 'could': 0.34; 'received:66': 0.35; 'but': 0.35; 'two': 0.37; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'extremely': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'from:no real name:2**0': 0.61; 'first': 0.61; 'times': 0.62; 'header:Message- Id:1': 0.63; '2014,': 0.84; 'sweeping': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:x-sasl-enc:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=mesmtp; bh=am07HSfK9/WdFdpxuCO0mvTrj2E=; b=kkBp stfcdi0NFH0g7hoGKu5zGN2b/tkAg8qYucqysSDV2DKFuWctWqF8yVThVyGmee+p q3vNzgSJiaXMMSq9NZTpqruz355gF6aRPT0MyKUTY0kBvQ6jHr2ZAvXgMHwXWiiu uRRFP+654a2sfoOArHy3WK0rzP/ySmFtFRamVps= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to :mime-version:content-transfer-encoding:content-type:in-reply-to :references:subject:date; s=smtpout; bh=am07HSfK9/WdFdpxuCO0mvTr j2E=; b=t1MxfkrGZovrHmGvCzClwqIcilGECBpNffMXEtj7xOMSq5JQxZdjfRzp q7rIFVfrDmoOUa7ZRNriKms7N6BdjrP8eEVsKxBUIPnSC51wnaQZrgFMaNRU5UZH DtrS4GMO/s70LfoMbd9vHYVmsrOD2t725W0YlgyrowvSzEBJSP4= X-Sasl-Enc: qRuFdFHXNu7FX6nmluPcvF+9v+I7UgmWMnfrwykLbseJ 1412826846 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-1d265f39 In-Reply-To: References: Subject: Re: Toggle Date: Wed, 08 Oct 2014 23:54:06 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412826850 news.xs4all.nl 2899 [2001:888:2000:d::a6]:38033 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78871 On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote: > When I first read this I was extremely jealous of the originator but > having used it umpteen times I'm still extremely jealous of the > originator!!! Why doesn't my mind work like his? :) You could also keep the ints in two variables and do a ^= b : b ^= a : a ^= b. Or use a, b = b, a. What I don't see in that answer is any benchmarking support for his sweeping assertions of what is the fastest version.