Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68451
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.news.ox.ac.uk!news.ox.ac.uk!news.stack.nl!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.036 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'resulting': 0.04; 'compiler': 0.07; "subject:' ": 0.07; 'subject:string': 0.09; 'unary': 0.16; 'wrote:': 0.18; 'mon,': 0.24; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'constant': 0.31; 'operations.': 0.31; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'method': 0.36; 'error.': 0.37; 'example,': 0.37; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'no.': 0.61; 'mar': 0.68; 'outcome': 0.93 |
| 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=blkn0GGSZjICOx27YP+ytHzbl1GsjHn+rkwd/KG02c0=; b=zkRS7dYrstXbWqGLZdwoWfsCUDUn73vdqWyI9Z42yn2la5lh0+uOdFzOQ8oLtPdISA nPoWl2ML2LgvEx4i7xr/8YzLqXkpCGbHUJapQTnbfVCYpYwIQUFNIJXyrRPlUxYOH0eW dsJqWH7AND3x3NBAITfBMmTUG90lWoYXuWbD/56c+md9IZ5WBOc6IYMRmAGjNEkGj0zV nVyWQDWSSzja2Qdzu5wF6kHwMC786il2euNLURDQtmWhjFHtOhscKev1v+CEPeBbToej vmiC8Si+xUnUKyAqI/zrCRWZDOwUQwNHDpaX2JQs2J/I80zVPb+RszTRvuIWk2/2whT7 UJ2Q== |
| X-Received | by 10.68.134.198 with SMTP id pm6mr27757807pbb.9.1395080925900; Mon, 17 Mar 2014 11:28:45 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <87y508r8ro.fsf@elektro.pacujo.net> |
| References | <8c862bec-815e-424c-81e2-8f37ebab1c35@googlegroups.com> <lg779d$5f4$2@speranza.aioe.org> <mailman.8201.1395075805.18130.python-list@python.org> <87y508r8ro.fsf@elektro.pacujo.net> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Mon, 17 Mar 2014 12:28:05 -0600 |
| Subject | Re: 'complex' function with string argument. |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.8216.1395080937.18130.python-list@python.org> (permalink) |
| Lines | 11 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1395080938 news.xs4all.nl 2907 [2001:888:2000:d::a6]:58506 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:68451 |
Show key headers only | View raw
On Mon, Mar 17, 2014 at 12:15 PM, Marko Rauhamaa <marko@pacujo.net> wrote: > Is "-2.0" a literal? > > What's the outcome of > > -2.0.__str__() No. The compiler will try to optimize it into a single constant if it can, but it has to be done in accordance with the order of operations. In that example, the __str__ method is called before the unary - is applied, resulting in an error.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
'complex' function with string argument. Jayanth Koushik <jnkoushik@gmail.com> - 2014-03-15 09:26 -0700
Re: 'complex' function with string argument. Mark H Harris <harrismh777@gmail.com> - 2014-03-17 11:18 -0500
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 04:03 +1100
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-17 20:15 +0200
Re: 'complex' function with string argument. Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-17 12:28 -0600
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 05:59 +1100
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-17 21:22 +0200
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 06:32 +1100
Re: 'complex' function with string argument. Steven D'Aprano <steve@pearwood.info> - 2014-03-18 04:08 +0000
Re: 'complex' function with string argument. Mark H Harris <harrismh777@gmail.com> - 2014-03-17 13:20 -0500
Re: 'complex' function with string argument. Steven D'Aprano <steve@pearwood.info> - 2014-03-18 04:52 +0000
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 15:59 +1100
Re: 'complex' function with string argument. Mark H Harris <harrismh777@gmail.com> - 2014-03-18 11:14 -0500
Re: 'complex' function with string argument. wxjmfauth@gmail.com - 2014-03-19 00:30 -0700
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-19 10:51 +0200
Re: 'complex' function with string argument. wxjmfauth@gmail.com - 2014-03-19 02:52 -0700
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-19 12:09 +0200
Re: 'complex' function with string argument. Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-19 04:33 -0600
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-19 12:53 +0200
Re: 'complex' function with string argument. Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-19 13:35 -0600
Re: 'complex' function with string argument. Skip Montanaro <skip@pobox.com> - 2014-03-19 06:04 -0500
Re: 'complex' function with string argument. wxjmfauth@gmail.com - 2014-03-19 07:35 -0700
Re: 'complex' function with string argument. Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-19 12:45 -0600
Re: 'complex' function with string argument. Mark Dickinson <mdickinson@enthought.com> - 2014-03-17 17:55 +0000
Re: 'complex' function with string argument. Terry Reedy <tjreedy@udel.edu> - 2014-03-17 18:06 -0400
Re: 'complex' function with string argument. Skip Montanaro <skip@pobox.com> - 2014-03-17 18:59 -0500
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 11:16 +1100
Re: 'complex' function with string argument. Skip Montanaro <skip@pobox.com> - 2014-03-17 20:07 -0500
Re: 'complex' function with string argument. Christian Gollwitzer <auriocus@gmx.de> - 2014-03-18 08:04 +0100
Re: 'complex' function with string argument. Chris Angelico <rosuav@gmail.com> - 2014-03-18 18:11 +1100
Re: 'complex' function with string argument. Steven D'Aprano <steve@pearwood.info> - 2014-03-18 08:00 +0000
Re: 'complex' function with string argument. Christian Gollwitzer <auriocus@gmx.de> - 2014-03-18 09:21 +0100
Re: 'complex' function with string argument. Marko Rauhamaa <marko@pacujo.net> - 2014-03-18 16:00 +0200
csiph-web