Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36698

Re: PyWart: Module access syntax

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 <nicholas.cole@gmail.com>
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&gt;': 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 <nicholas.cole@gmail.com>
To Rick Johnson <rantingrickjohnson@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.443.1357992983.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Jan 11, 2013 at 6:01 AM, Rick Johnson
<rantingrickjohnson@gmail.com>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.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-10 22:01 -0800
  Re: PyWart: Module access syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-11 16:02 +0000
    Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 20:34 -0800
      Re: PyWart: Module access syntax Chris Angelico <rosuav@gmail.com> - 2013-01-12 15:40 +1100
        Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 21:46 -0800
          Re: PyWart: Module access syntax Chris Angelico <rosuav@gmail.com> - 2013-01-12 16:59 +1100
          Re: PyWart: Module access syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-12 06:53 +0000
        Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-11 21:46 -0800
        Re: PyWart: Module access syntax 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-12 16:02 -0800
        Re: PyWart: Module access syntax 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-12 16:02 -0800
      Re: PyWart: Module access syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-12 06:45 +0000
        Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-13 21:22 -0800
          Re: PyWart: Module access syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-14 17:34 +0000
            Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-14 23:07 -0800
          Re: PyWart: Module access syntax Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-14 11:51 -0700
            Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-14 23:49 -0800
              Re: PyWart: Module access syntax Chris Angelico <rosuav@gmail.com> - 2013-01-15 19:08 +1100
            Re: PyWart: Module access syntax Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-14 23:49 -0800
          Re: PyWart: Module access syntax Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-14 12:04 -0700
          Re: PyWart: Module access syntax "D'Arcy J.M. Cain" <darcy@druid.net> - 2013-01-14 14:35 -0500
          Re: PyWart: Module access syntax Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-14 13:38 -0700
      Re: PyWart: Module access syntax Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-11 23:55 -0700
      Re: PyWart: Module access syntax alex23 <wuwei23@gmail.com> - 2013-01-11 23:36 -0800
  Re: PyWart: Module access syntax Nicholas Cole <nicholas.cole@gmail.com> - 2013-01-12 12:16 +0000

csiph-web