Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Joel Goldstick Newsgroups: comp.lang.python Subject: Re: *= operator Date: Sat, 21 Nov 2015 08:58:34 -0500 Lines: 35 Message-ID: References: <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: 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; '>': 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99210 On Sat, Nov 21, 2015 at 8:39 AM, Steven D'Aprano 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