Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'remind': 0.05; 'python': 0.09; 'notation.': 0.09; 'cc:addr:python-list': 0.10; 'language,': 0.11; 'files.': 0.13; 'subject:access': 0.16; 'sufficient,': 0.16; 'syntax.': 0.16; 'writer': 0.16; 'wrote:': 0.17; '8bit%:3': 0.17; "shouldn't": 0.17; 'skip:\xa0 30': 0.17; 'jan': 0.18; 'module': 0.19; 'code.': 0.20; 'email addr:gmail.com>': 0.20; 'cc:2**0': 0.23; "python's": 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'language.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'objects': 0.29; 'fri,': 0.30; 'johnson': 0.32; '11,': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'wrong': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'should': 0.36; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'list,': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'free': 0.61; 'is.': 0.62; 'more': 0.63; 'fact,': 0.69; 'truth': 0.75; 'absolutely': 0.84; '2013': 0.84; 'apparent': 0.91; 'rick': 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 :cc:content-type; bh=Ih+pSRntAla/8eglZcDM7E74BLeUaIM16E1ed1a50K4=; b=hmxxjZFjuKC7DkAWBSEAy39UAhwOFQtHhMqfFPdLgWKCQM1XM+8dgHIdYsI2s9b8PU RN1lJ1bM/zd8SnXMuDL5AYahqwLD/FOesEsp6gECgkPJBLQiIus0y9ksnSgBeWx/tClM ArUvRQKGra3JRLrLsf0JbaKNkhlfpTMR1iiqKcSjv6KGn65ORawrmdbV/4VssIW7iteP ORs3HVceT9u1b7N2DFSapyeSwabku31tUTc6sLHaZu0k6sSnc6e4dRz0HI3sJXQ1W4cc 27YhFccR9auVfs4u1NQgHw4eaB6H7V55rbrozXs5TbNJza4TGw4bSUJKz5NTLzKP/HE2 tDxw== MIME-Version: 1.0 In-Reply-To: <8e9b2b0e-1c34-46cc-80c6-57fbb5fd756c@googlegroups.com> References: <8e9b2b0e-1c34-46cc-80c6-57fbb5fd756c@googlegroups.com> Date: Sat, 12 Jan 2013 12:16:20 +0000 Subject: Re: PyWart: Module access syntax From: Nicholas Cole To: Rick Johnson Content-Type: multipart/alternative; boundary=bcaec517a9c231dde304d3166151 Cc: python-list@python.org 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: 62 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357992983 news.xs4all.nl 6963 [2001:888:2000:d::a6]:56766 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36698 --bcaec517a9c231dde304d3166151 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jan 11, 2013 at 6:01 AM, Rick Johnson wrote: > > Python's module/package access uses dot notation. > > mod1.mod2.mod3.modN > > Like many warts of the language, this wart is not so apparent when first > learning the language. The dot seems innocently sufficient, however, in > truth it is woefully inadequate! Observe: > > name1.name2.name3.name4.name5 > > I find it reassuring to have these kinds of questions on the list, because they actually remind me how brilliantly designed Python is. As the user of a module I shouldn't care about the internal arrangement of objects and files. I don't care. More than that, as the writer of a module I should be free to refactor the internals of a module without breaking existing code. There is absolutely nothing wrong at all with the syntax. In fact, it's fantastic. N. --bcaec517a9c231dde304d3166151 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Fri, Jan 11, 2013 at 6:01 AM, Rick Johnson <= ;rantingr= ickjohnson@gmail.com> wrote:

Python's module/package access uses dot notation.

=A0 mod1.mod2.mod3.modN

Like many warts of the language, this wart is not so apparent when first le= arning the language. The dot seems innocently sufficient, however, in truth= it is woefully inadequate! Observe:

=A0name1.name2.name3.name4.name5


I find it reassuring to have these kinds of questions on the list, beca= use they actually remind me how brilliantly designed Python is.

As the user of a module I shouldn't care about the= internal arrangement of objects and files. =A0I don't care. =A0More th= an that, as the writer of a module I should be free to refactor the interna= ls of a module without breaking existing code.

There is absolutely nothing wrong at all wi= th the syntax. In fact, it's fantastic.

N.
--bcaec517a9c231dde304d3166151--