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


Groups > comp.lang.python > #78613

Re: Assignment Operators?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.169
X-Spam-Level *
X-Spam-Evidence '*H*': 0.67; '*S*': 0.00; 'operator,': 0.09; 'former,': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'appears': 0.22; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'operations.': 0.31; 'probably': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'subject:?': 0.36; 'should': 0.36; 'two': 0.37; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'read': 0.60; 'numbers': 0.61; "you're": 0.61; 'more': 0.64; 'different': 0.65; 'subject:Operators': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=7wnGXO5LKGMt8YicZZjXakBcWfCAZtW/JSdE6+5uRzQ=; b=ZQx6UgINoEhi2sQRx8u+32ln3G+cs0XUHxxXLLekRsi0fRBlrskZ7hD6oOs1manF+7 7AiQYREkvQyAxz6sxAukmba4DHjpYMnk/L0St3Cp+wuBFB2DpTJ33/neIdPzMa7swB65 M2uNHstoc8I/HgjSXfwCIPs8l2gU+uRSXlV28EmSareo4wrXtKzFWNpBwkrC9qBiSLoZ gYTo9rE+qQ0EYAM1QEgHM/LejhlGCPleLW1EhKK+yzPlp4TFJqFko5arSJ97VNiE9Vv7 T1qk8uUiYmjzyXtVw0fIDyADvH45fMtnusFQjm/WvQIWC3ZQkFNpevm2kiQktT5Kb/R8 IWZw==
X-Received by 10.68.135.70 with SMTP id pq6mr8796182pbb.10.1412265672911; Thu, 02 Oct 2014 09:01:12 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <9669f493-cfa4-4a84-9f4a-ce3009926ca3@googlegroups.com>
References <9669f493-cfa4-4a84-9f4a-ce3009926ca3@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Thu, 2 Oct 2014 10:00:32 -0600
Subject Re: Assignment Operators?
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14556.1412265676.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412265676 news.xs4all.nl 2897 [2001:888:2000:d::a6]:43646
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78613

Show key headers only | View raw


On Thu, Oct 2, 2014 at 7:24 AM, Didymus <lynto28@gmail.com> wrote:
>    The '|=' operator, I read should be like a = a | b, but this appears to add the two numbers as long as it's more than the previous:

Note that:

    a = a or b

and:

    a = a | b

are different operations. It sounds like you're probably looking for
the former, not the latter.

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Assignment Operators? Didymus <lynto28@gmail.com> - 2014-10-02 06:24 -0700
  Re: Assignment Operators? Chris Angelico <rosuav@gmail.com> - 2014-10-02 23:27 +1000
    Re: Assignment Operators? Grant Edwards <invalid@invalid.invalid> - 2014-10-02 14:23 +0000
  Re: Assignment Operators? Ian Kelly <ian.g.kelly@gmail.com> - 2014-10-02 10:00 -0600
  Re: Assignment Operators? sohcahtoa82@gmail.com - 2014-10-06 14:37 -0700

csiph-web