Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!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; 'subject:Python': 0.05; 'function,': 0.07; 'python': 0.09; "wouldn't": 0.11; ':-).': 0.16; 'fits': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'paradigm.': 0.16; 'singleton': 0.16; 'wrote:': 0.17; 'module,': 0.17; 'module': 0.19; 'code.': 0.20; 'define': 0.20; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; "doesn't": 0.28; 'oop': 0.29; 'class': 0.29; 'right?': 0.33; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'received:org': 0.36; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'subject:: ': 0.38; 'fact': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'called': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'love': 0.63 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sun, 24 Feb 2013 18:34:07 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 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> <512A96F6.1030902@lightbird.net> In-Reply-To: <512A96F6.1030902@lightbird.net> Content-Type: text/plain; charset=ISO-8859-1 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361756055 news.xs4all.nl 6858 [2001:888:2000:d::a6]:46516 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39853 On 02/24/2013 03:40 PM, Mitya Sirenef wrote: > 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 :-). A module indeed fits into the OOP paradigm. It's called a singleton and I love the fact that I can define and use them in python without wrapping them in tons of boilerplate class and factory code.