Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'static': 0.04; 'that?': 0.05; 'compiler': 0.07; 'stops': 0.07; 'strict': 0.07; 'builtin': 0.09; 'hiding': 0.09; 'override': 0.09; 'used.': 0.09; 'python': 0.11; 'language,': 0.12; 'thread': 0.14; '*other*': 0.16; 'attributes,': 0.16; 'checking,': 0.16; 'chris,': 0.16; 'governed': 0.16; 'here"': 0.16; 'namespace,': 0.16; 'python",': 0.16; 'restriction,': 0.16; 'essential': 0.16; 'prevent': 0.16; 'language': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'library': 0.18; 'passing': 0.19; 'meant': 0.20; 'seems': 0.21; '>>>': 0.22; 'programming': 0.22; 'python?': 0.22; 'to:name:python-list@python.org': 0.22; 'instance,': 0.24; 'mon,': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'gives': 0.31; 'code': 0.31; 'too.': 0.31; 'you?': 0.31; 'lot.': 0.31; 'piece': 0.31; 'prevention': 0.31; 'restricted': 0.31; 'anyone': 0.31; 'allows': 0.31; 'languages': 0.32; 'used,': 0.33; 'actual': 0.34; 'common': 0.35; 'beyond': 0.35; 'monday': 0.35; 'usual': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'culture': 0.36; 'doing': 0.36; 'should': 0.36; 'changing': 0.37; 'wrong': 0.37; 'being': 0.38; 'ahead': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'then,': 0.60; 'upgrading': 0.60; 'wonderful': 0.60; 'break': 0.61; 'helps': 0.61; 'new': 0.61; "you're": 0.61; 'such': 0.63; 'more': 0.64; 'within': 0.65; 'gathering': 0.68; 'nobody': 0.68; 'fact,': 0.69; 'as:': 0.81; '2015': 0.84; 'embracing': 0.84; 'etc,': 0.84; 'mindset': 0.84; 'understand,': 0.84; 'zen': 0.84; 'discovering': 0.91; 'here."': 0.91; 'notion': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pEmFJA8CqtXEc5bFopzNDHKlzLJgOgdSNcazP06I0Ys=; b=VRtWZq3KTsWpU8zlhOjHWK8Iw3daBNAucX2Fhl1GcHFg7et/u1NQ3wxLM4CAdM4eGD 3bUfeJNXC9q7sO1O9oF/18klcf0kBlRouNCwQBceVkKCqRkm+ITAG7DLClxAyAMsNj55 Lvsyw9a7r5gtzP4xShZ/byLw3ZEz3w6vRoVmtJG21Wikogc5OBoLFRwmfrlqIklJRVnz A2VSLIFCJobIoy0lSRzbiMuwO4CcRvvRgB4kOiCH7HIb6g0bJmEaWFzmHwvEr2DUGE9E ao7iqVMLid+SfyHvLPrxEJygUd3+x01tzOaiITwX02OGAFDc/U3GYBimvV4Wk8CvY0bQ TeaQ== MIME-Version: 1.0 X-Received: by 10.140.145.147 with SMTP id 141mr13969147qhr.51.1431348213275; Mon, 11 May 2015 05:43:33 -0700 (PDT) In-Reply-To: References: <554F9525.5040101@digipen.edu> Date: Mon, 11 May 2015 07:43:33 -0500 Subject: Re: anomaly From: boB Stepp To: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: , Newsgroups: comp.lang.python Message-ID: Lines: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431348215 news.xs4all.nl 2848 [2001:888:2000:d::a6]:53614 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90372 On Mon, May 11, 2015 at 2:44 AM, Chris Angelico wrote: > On Mon, May 11, 2015 at 5:12 AM, boB Stepp wrote: >>> Common Python thought:: "We're all adults here." If you want to override >>> a builtin within your own namespace, who are we to stop you? >> >> I'm surprised that this thought has not been added to the "Zen Of >> Python", as I see it as more and more recurrent as I continue my >> studies. What I would like to comprehend is what is the essential >> mindset of Python? That is, what do I need to understand, so that I am >> no longer likely to be surprised by discovering new possibilities in >> Python such as what the current thread is discussing? > > The Zen of Python is a static document, a historical artifact of a > sort. But in terms of understanding the philosophy of Python, "we're > all adults here" is a big part of it. Once you grok the notion that > nothing can be prevented, you're freed from such considerations as: > > * Obfuscating, encrypting, or otherwise hiding your source code > * Private members with restricted access > * Strict type checking, to prevent someone passing in a wrong piece of data > * Prevention of monkey-patching > > etc, etc, etc. In actual fact, anyone can bypass any restriction, in > any language; and Python is just more open/honest about it than > languages like C++; for instance, instead of having true private > members where the compiler stops you from looking at or changing them, > Python gives you single-underscore-named attributes, where nobody > stops you from doing anything, but there's a general understanding > that they're not governed by the usual compatibility rules, so > upgrading a library might break your code. Happy with that? Go ahead > then, use the internals. Thanks, Chris, that helps a lot. It seems that beyond being a programming language, Python has a well-established culture that suggests how the language should be used. I am gathering that understanding the language and embracing the existing culture are needed to use Python in the way it is meant to be used, though the language design allows *other* ways, too. > Hakuna matata, what a wonderful phrase. Indeed! And a good way to start my Monday morning. -- boB