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


Groups > comp.lang.python > #99210

Re: *= operator

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Joel Goldstick <joel.goldstick@gmail.com>
Newsgroups comp.lang.python
Subject Re: *= operator
Date Sat, 21 Nov 2015 08:58:34 -0500
Lines 35
Message-ID <mailman.36.1448114322.2291.python-list@python.org> (permalink)
References <a76b1b5b-4321-41bb-aeca-0dac787752d9@googlegroups.com> <56507422$0$1594$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de Bac1omXSjtzONKmz24MJYAB2Q201IS6/XmAT3pCUOA3Q==
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.045
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'received:209.85.223': 0.03; '21,': 0.07; 'cc:addr:python-list': 0.09; 'python': 0.10; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '&gt;': 0.18; 'shell': 0.18; '>>>': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'url:mailman': 0.30; 'bill': 0.32; 'url:python': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'url:listinfo': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'nov': 0.35; 'but': 0.36; 'skip:i 20': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'skip:& 10': 0.37; 'things': 0.38; 'received:209': 0.38; 'mean': 0.38; 'means': 0.39; 'does': 0.39; 'url:mail': 0.40; 'forget': 0.60; 'your': 0.60; 'no.': 0.62; 'more': 0.63; 'yourself': 0.73; '12:20': 0.84; 'answered,': 0.84; 'to:none': 0.91; 'joel': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=hRMOigpwgtKJYEO0cc8acDSMUpO2UKHXF3MBzI09XD0=; b=qI4+zsO4V+pZGm4kVcZnpNDfJcR5zhI8EcjlH++xkcNNhBGPVvo5BOJ5mrttL8phnO P0ozBHxAe/DjWjh/eF6i3z95TSSSNEh6c4Afcc6TfNbeDcV6zZL0zHRloTGwk5WVTcra +dwFV0F/QG5JUjMLzgIzbq1q5uqvwUPs+k9xtfyY+2em3YUp3HkAR8LQatlorxZRD47Y 2qfFUvBhpZiptOKj4axU30l5hd6TMPMKBmVfmywE0+dxZgBlO3Qdlk4/9Mn+FFCBtjCj 28b6pGItReusPhrep80KFFJYT2tr91t3Xm6y6/VCQvtQWMerH177o7iMEwvcfWfcbOZi cyvg==
X-Received by 10.107.130.167 with SMTP id m39mr18818461ioi.18.1448114314062; Sat, 21 Nov 2015 05:58:34 -0800 (PST)
In-Reply-To <56507422$0$1594$c3e8da3$5496439d@news.astraweb.com>
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:99210

Show key headers only | View raw


On Sat, Nov 21, 2015 at 8:39 AM, Steven D'Aprano <steve@pearwood.info>
wrote:

> On Sun, 22 Nov 2015 12:20 am, Cai Gengyang wrote:
>
> > Does bill *= 1.08 mean bill = bill * 1.15 ?
>
> No. It means `bill = bill * 1.08`, not 1.15.
>
>
>
> --
> Steven
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Others have answered, but don't forget to try things like this yourself in
the interactive python shell of your choice:

Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> bill = 1
>>> bill *=1.08
>>> bill
1.08
>>>



-- 
Joel Goldstick
http://joelgoldstick.com/stats/birthdays

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


Thread

*= operator Cai Gengyang <gengyangcai@gmail.com> - 2015-11-21 05:20 -0800
  Re: *= operator BartC <bc@freeuk.com> - 2015-11-21 13:37 +0000
  Re: *= operator Steven D'Aprano <steve@pearwood.info> - 2015-11-22 00:39 +1100
    Re: *= operator Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-21 08:58 -0500
  Re: *= operator "Frank Millman" <frank@chagford.com> - 2015-11-21 15:46 +0200
    Re: *= operator Cai Gengyang <gengyangcai@gmail.com> - 2015-11-21 05:55 -0800

csiph-web