Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Question about math.pi is mutable Date: Tue, 10 Nov 2015 17:10:09 +1100 Lines: 37 Message-ID: References: <563eba85$0$1611$c3e8da3$5496439d@news.astraweb.com> <87ziyowy83.fsf@elektro.pacujo.net> <8537wghwjb.fsf@benfinney.id.au> <85y4e8ggrj.fsf@benfinney.id.au> <85twowgfm6.fsf@benfinney.id.au> <564081e7$0$1592$c3e8da3$5496439d@news.astraweb.com> <56415873$0$1614$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de wjCkrb9QSLzJAGBjGXCgGAaXWvd8s7aog5eZePhEMlxg== Cancel-Lock: sha1:4ZpE7mQ6EeCe2XiqQ+gpErE6GMI= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'true,': 0.04; 'compiler': 0.05; 'run-time': 0.05; 'subject:Question': 0.05; 'compile-time': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'bug': 0.10; ':-)': 0.12; 'do,': 0.15; 'things.': 0.15; 'ben,': 0.16; 'did,': 0.16; 'possibly,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'sure.': 0.16; 'thread.': 0.16; 'header:User-Agent:1': 0.26; '(which': 0.26; 'header:X-Complaints-To:1': 0.26; 'behaviour': 0.29; 'does,': 0.29; 'program,': 0.29; "we're": 0.30; "can't": 0.32; 'run': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'surely': 0.33; 'definition': 0.34; 'running': 0.34; 'done': 0.35; "isn't": 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'doing': 0.38; 'anything': 0.38; 'speak': 0.38; 'to:addr:python.org': 0.40; 'advanced': 0.61; 'more.': 0.63; 'past.': 0.66; 'talking': 0.67; 'acts': 0.72; 'informed': 0.76; 'attention': 0.76; '_o__)': 0.84; 'brain,': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:98575 Steven D'Aprano writes: > Ben, I fear that you are not paying attention to me :-) Possibly, though I also think there's miscommunication in this thread. You speak of “compile time” and “run time”. You also speak of what the compiler can do, at run time. I am a Bear of Little Brain, but: Isn't anything that the *compiler* does, by definition done at *compile* time? The run-time behaviour of the program is, of course, *affected* by what the compiler has done in the past. But the compiler acts only at compile time, and its compile-time behaviour can't be determined by what's happening at run time. If that's not true, I fear we're not talking about the same things. > At compile time, `func(x)` might do anything. But at runtime, we know > exactly what it did, because it just did it. Sure. All my statements about compile-time optimisations are those that can be applied at compile time (which I intend to be synonymous with “when the compiler is doing its job”), and so can't be informed by what happens at run time. If the proposal is to make optimisations that must be informed by the run-time state of the running program, we're surely talking about not just the compiler any more. No? -- \ “Any sufficiently advanced bug is indistinguishable from a | `\ feature.” —Rich Kulawiec | _o__) | Ben Finney