Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Thu, 4 Aug 2016 07:39:31 +1000 Lines: 19 Message-ID: References: <579B1ABB.1070500@rece.vub.ac.be> <3d96c99b-72fa-439c-93b4-abef2b9fd8a0@googlegroups.com> <579f207f$0$11110$c3e8da3@news.astraweb.com> <01f3d086-ba00-43c6-8f86-712fb940b054@googlegroups.com> <57a0dd53$0$1620$c3e8da3$5496439d@news.astraweb.com> <87a8gv562h.fsf@jester.gateway.pace.com> <57a1b23c$0$11093$c3e8da3@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de jkbq2s6BZ7Yo2WaUYXX95QzEY2OaOzMauiVw16dUTwQg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'cpython': 0.05; 'subject:code': 0.07; 'sys,': 0.07; 'cc:addr:python-list': 0.09; 'forcing': 0.09; 'subject:Why': 0.09; 'python': 0.10; 'python.': 0.11; 'subject:not': 0.11; 'files.': 0.13; 'interpreter': 0.15; 'thu,': 0.15; '.py': 0.16; '2016': 0.16; 'core.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'pypy.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'fairly': 0.22; 'simpler': 0.22; 'file.': 0.22; 'am,': 0.23; 'appears': 0.23; 'somewhere': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; "i've": 0.25; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'dll': 0.27; 'idea': 0.28; 'interface': 0.29; 'allows': 0.30; 'common': 0.33; 'except': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'instead': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'means': 0.39; 'does': 0.39; 'takes': 0.39; "you'll": 0.61; 'export': 0.63; 'different': 0.63; 'else.': 0.66; 'direct': 0.68; 'chrisa': 0.84; 'to:none': 0.91; 'this;': 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:cc; bh=MBeG0f3ik9ux5LYfwOV7QwLHrSVZ/hGkhmaZY39hNrs=; b=l9EMvrPKDyTquQCW2Or1mkui9vLJAlLejLgCkgAebUXvmPzm37mpi/kx/LM2p90ytp JYnA/LrgIF2kbN0R5LaG9xcbXUMJn6px8SdWUYTCt+AEey2vx84pgghrb1Wa34eFnvr0 xe+hbOTw2hCezFJM4yyqni+c+e/XEM31bcnHrDPjEDWPyHLpuB+0wvYQ1tFWE3ns/4Oo AQu1DCHu0rzeCpsxnW9WUPtte7eTbjCkS58enk5azRlfAuxQPELtEilD9MzH+IfHeT/b PKpPYEhkUNhtqPfYYVzeZmmbCylQt7ucYxEd06tx7V4InABtE0E/C9UOcnnrCQSIbFR5 Uztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=MBeG0f3ik9ux5LYfwOV7QwLHrSVZ/hGkhmaZY39hNrs=; b=Zh5OAgqTnNtcbf3TFidG+hXrW7AORlxbTZWXRryD4w7pbEN8AHasrXJm5Rt9zc7+XJ r+t7L8S6B4Bb0oCiEFPPSDBGEwGo6/gSk8xy3h4YyJ4zSD7L6PDPGwYum4kK8tisHuVf C91bsXTVSnLruzQtp+keARIlNQSDKRwXQjQBJTEMfdJI6ewPQ3b1nTQWuqGLZfZ38I6c G+WWw/oEzA7qVDlD3/V5dbOT6PAeQrKzAv2UXg2OHD9pk6VHJEhijFp9HIqQBBtENuik 1FkTZRPMEstLMOhtEEOdnS9MR3LUGx2V6NHCAbX0Flu2zDOxtuFxzLMwRFJxFho69ZOa hj3g== X-Gm-Message-State: AEkoouuHp/VZlFJNs82Wh0uPpNXL4lL38N8153dOVSHFVQ2cTbdVZ5U+3wzJo27vzqEyC31A44sxSsc58NwKUw== X-Received: by 10.194.113.105 with SMTP id ix9mr1878547wjb.30.1470260372317; Wed, 03 Aug 2016 14:39:32 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <579B1ABB.1070500@rece.vub.ac.be> <3d96c99b-72fa-439c-93b4-abef2b9fd8a0@googlegroups.com> <579f207f$0$11110$c3e8da3@news.astraweb.com> <01f3d086-ba00-43c6-8f86-712fb940b054@googlegroups.com> <57a0dd53$0$1620$c3e8da3$5496439d@news.astraweb.com> <87a8gv562h.fsf@jester.gateway.pace.com> <57a1b23c$0$11093$c3e8da3@news.astraweb.com> Xref: csiph.com comp.lang.python:112305 On Thu, Aug 4, 2016 at 6:53 AM, BartC wrote: > On 03/08/2016 21:12, Chris Angelico wrote: >> >> Fairly common approach - and it means you'll never find those .py >> files. So it's no different from looking for sys.py and not finding >> it, except that in the case of CPython's sys, it's not even a DLL - >> it's part of the interpreter core. > > > I don't understand. With direct access to msvcrt.dll, the interface to that > will be inside a .py file. Not buried away somewhere else. Oh. CPython takes a much simpler approach: instead of forcing a Python module to "think like C", it allows a C module to export functions to Python. So when you "import math", you actually get something from a .so/.dll file. I've no idea how Jython does this; it appears that math.__file__ is AttributeError. Ditto PyPy. ChrisA