Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91971 > unrolled thread

most ambiguous line of code ever written?

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2015-06-03 16:20 +0100
Last post2015-06-03 10:13 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  most ambiguous line of code ever written? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-03 16:20 +0100
    Re: most ambiguous line of code ever written? John Ladasky <john_ladasky@sbcglobal.net> - 2015-06-03 10:13 -0700

#91971 — most ambiguous line of code ever written?

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-06-03 16:20 +0100
Subjectmost ambiguous line of code ever written?
Message-ID<mailman.112.1433344889.13271.python-list@python.org>
I wanted a piece of code to write alternatively to the left and right 
sides of a deque.  I remembered a stackoverflow question about toggling 
with an excellent answer from Raymond Hettinger.  So I now have this.

right = not right

Isn't that just beautiful?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [next] | [standalone]


#91979

FromJohn Ladasky <john_ladasky@sbcglobal.net>
Date2015-06-03 10:13 -0700
Message-ID<90349f7e-16ec-4d4e-a5a6-6f6fdd1034d2@googlegroups.com>
In reply to#91971
On Wednesday, June 3, 2015 at 8:21:43 AM UTC-7, Mark Lawrence wrote:

> right = not right
> 
> Isn't that just beautiful?

A few weeks ago, we were discussing the fact that, in Python 2, True = False, and False = True, were both legal statements in Python.  I remarked: "every politician's dream!"  This remark would apply equally well to your clever statement.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web