Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(at': 0.03; 'languages,': 0.04; 'subject:Python': 0.05; 'function,': 0.07; 'granted,': 0.07; 'python': 0.09; 'python:': 0.09; 'itself.': 0.11; "wouldn't": 0.11; '"if"': 0.16; ':-).': 0.16; 'least,': 0.16; 'press,': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'roy': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'module,': 0.17; 'feb': 0.19; 'module': 0.19; 'object.': 0.22; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; "doesn't": 0.28; 'chris': 0.28; '>>>>': 0.29; 'function': 0.30; 'code': 0.31; 'could': 0.32; 'him.': 0.33; 'right?': 0.33; 'to:addr:python-list': 0.33; 'that,': 0.34; 'pm,': 0.35; 'really': 0.36; 'but': 0.36; 'detail': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'is.': 0.62; 'making': 0.64; 'smith': 0.71; 'article': 0.78; '2013': 0.84; 'everything.': 0.84; 'furman': 0.84; 'maybe,': 0.84; 'telegraph': 0.84; 'careful': 0.91; 'ethan': 0.91; 'write:': 0.91 Date: Sun, 24 Feb 2013 17:40:54 -0500 From: Mitya Sirenef User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Newbie References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> <61471a01-ee6e-4bc6-bd08-8696a31ec1eb@googlegroups.com> <512A795D.8060607@stoneleaf.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361745672 news.xs4all.nl 6922 [2001:888:2000:d::a6]:60169 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39806 On 02/24/2013 04:44 PM, Chris Angelico wrote: > On Mon, Feb 25, 2013 at 8:08 AM, Roy Smith wrote: >> In article , >> Chris Angelico wrote: >> >>>> no need to remember what's an object and what's not -- everything is an >>>> object > > Careful on the citations - Ethan Furman said that, I just quoted him. > >> Well, not quite everything. If I write: >> >> if foo: >> do_this() >> and_this() >> >> the code block making up the body of the "if" statement is not an >> object. In some languages, it is. > > Maybe, but the code of an entire function *is*. Granted, it's not an > object that can be built up manually (at least, not that I know of), > and it offers only limited functionality (dis.dis, but not a lot > else), so really it could be seen as just an implementation detail of > the function object itself. But it's still an object. > > ChrisA But if block doesn't have to be inside a function, right? It needs to be inside a module, but then again everything is inside a module, but it wouldn't be very object-oriented if the module was the only object in Python :-). -m -- Lark's Tongue Guide to Python: http://lightbird.net/larks/ The press, the machine, the railway, the telegraph are premises whose thousand-year conclusion no one has yet dared to draw. Friedrich Nietzsche