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


Groups > comp.lang.python > #110925

Re: Namespaces are one honking great idea

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Kevin Conway <kevinjacobconway@gmail.com>
Newsgroups comp.lang.python
Subject Re: Namespaces are one honking great idea
Date Sat, 02 Jul 2016 01:50:24 +0000
Lines 43
Message-ID <mailman.6.1467424243.2295.python-list@python.org> (permalink)
References <57767a97$0$1606$c3e8da3$5496439d@news.astraweb.com> <577693AC.6090807@stoneleaf.us> <mailman.2.1467388849.2295.python-list@python.org> <5776a3ef$0$1608$c3e8da3$5496439d@news.astraweb.com> <5776C4A4.5000407@stoneleaf.us> <mailman.5.1467401379.2295.python-list@python.org> <577713c6$0$1587$c3e8da3$5496439d@news.astraweb.com> <CAKF=+diE82nJ6wgN2oWYeysLytNqPnfEwngV7QsxwJVaHf1Ebg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de EvCaIK+hB9Vkp4lIykz9lQ5Eza0/PRzom6Dx6o3XcSGg==
Return-Path <kevinjacobconway@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'static': 0.03; 'yet.': 0.03; 'namespace': 0.09; 'undocumented': 0.09; ':-)': 0.12; '&gt;&gt;&gt;': 0.15; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Namespaces': 0.16; 'to:addr:pearwood.info': 0.16; "to:name:steven d'aprano": 0.16; 'worse.': 0.16; 'wrote:': 0.16; 'first.': 0.18; '&gt;': 0.18; '>>>': 0.20; 'to:2**1': 0.21; 'referring': 0.22; 'am,': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'said,': 0.27; 'idea': 0.28; 'initial': 0.28; 'feature,': 0.29; 'classes': 0.30; 'url:mailman': 0.30; 'class.': 0.30; 'anyone': 0.32; 'class': 0.33; 'url:python': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'url:listinfo': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'instance': 0.35; 'there': 0.36; 'url:org': 0.36; 'cases': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'expect': 0.37; 'method': 0.37; 'say': 0.37; 'wanted': 0.37; 'things': 0.38; 'feedback': 0.38; 'mean': 0.38; 'sure': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'some': 0.40; 'believe': 0.66; 'liked': 0.67; 'jul': 0.72; 'satisfied': 0.83; "(don't": 0.84; 'decorators.': 0.84; 'ethan': 0.91; 'furman': 0.91; 'besides,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=l8qA6Ame9OFsWgHC0klc+6LiZ+p5xX6CGkr4vQ2DXSw=; b=Qaxaml8Q7Q5D7umMm2J4JIU7UUwOdegGaEr600BIXSnoXWRysCCGM5+uLevMEix8o/ nX2Ftz26SL5GM+FdS/mLTSm9ytzuXcWMmc5/1WCSKy7FYE22nXCf9WJUUQ8+U5bYKlwA SJf+P/NYXUXr4m42BsPCJob1u+62HsMyhiQbhgbyyX19ULA73Gk+WmhwaZrfe0qmudLm sjrQ8TC21Dwq9j+LgZIO7PJoUctos+qxumApwBAzrPGGyFQMg48Itm06xRgWCyH1Q7dM M4JE6XrUJVQUnFHVQLLwXlcMxuGy/VTPf4o6gj10S3mURxXYWC0CV+81XtRRz908SNS9 ZAcA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=l8qA6Ame9OFsWgHC0klc+6LiZ+p5xX6CGkr4vQ2DXSw=; b=aZhpKf9RxKCIjAvkwZ7Uotg4urMEX7c14UF5nxcC1j9gwfLajkwB5DwgXIt7TOG1qK tGeyiORxp5lxCqymCWxObuBeF9E0GJpMJleJDq1lLjtNRs1Cww5KozCPwnnXtJgsBbqy XxNZlYRoLOXV0s3+a1WqpP+ZCWjW6sicwK8C37PII96MSViozcHPsDqJx44z/I49SBzU vPf6AZG7OG1Kh9dOO9/jvaLJ7OfrsdgIXewgnPx5qQ+w1bRh/wmUyIFvghjGIwVSjlQx kQD4ZG/a6vk7IcZrBtSb4IpAyKGvWWCo6lV3t5wp1KgLjOo8wY0z+vRKzkhYgeULvmyh aaHQ==
X-Gm-Message-State ALyK8tIV01aSGn3T6EzsRvtKBejgNoGU/zCG7JIYC/Eu01g61H38XSZt5X9v1WRz2Fpa3RNbmX1bDNtS+PKQcA==
X-Received by 10.159.39.38 with SMTP id a35mr659873uaa.92.1467424233667; Fri, 01 Jul 2016 18:50:33 -0700 (PDT)
In-Reply-To <577713c6$0$1587$c3e8da3$5496439d@news.astraweb.com>
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAKF=+diE82nJ6wgN2oWYeysLytNqPnfEwngV7QsxwJVaHf1Ebg@mail.gmail.com>
X-Mailman-Original-References <57767a97$0$1606$c3e8da3$5496439d@news.astraweb.com> <577693AC.6090807@stoneleaf.us> <mailman.2.1467388849.2295.python-list@python.org> <5776a3ef$0$1608$c3e8da3$5496439d@news.astraweb.com> <5776C4A4.5000407@stoneleaf.us> <mailman.5.1467401379.2295.python-list@python.org> <577713c6$0$1587$c3e8da3$5496439d@news.astraweb.com>
Xref csiph.com comp.lang.python:110925

Show key headers only | View raw


I believe the namespace object you are referring to is exactly a class.
IIRC, classes came about as a "module in a module".

Regardless, all use cases you've listed are already satisfied by use of the
static and class method decorators. Methods decorated with these do not
require an instance initialization to use.

On Fri, Jul 1, 2016, 20:17 Steven D'Aprano <steve@pearwood.info> wrote:

> On Sat, 2 Jul 2016 05:29 am, Ethan Furman wrote:
>
> > On 07/01/2016 10:10 AM, Steven D'Aprano wrote:
> >> On Sat, 2 Jul 2016 02:00 am, Ethan Furman wrote:
> >
> >>> Did you mean for this to go to -Ideas?
> >>
> >> Not yet. I wanted some initial feedback to see if anyone else liked the
> >> idea before taking it to Bikeshedding Central :-)
> >>
> >> Besides, I expect Python-Ideas will say it needs to be a package on PpPI
> >> first. Although I am kinda considering sneaking this into the std lib as
> >> an undocumented internal feature, like simplegeneric in pkgutil. (Don't
> >> tell anyone I said that *wink* )
> >
> > Are there good use-cases for this in the stdlib?
>
> I have at least one.
>
>
>
> --
> Steven
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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


Thread

Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-02 00:13 +1000
  Re: Namespaces are one honking great idea Random832 <random832@fastmail.com> - 2016-07-01 10:40 -0400
  Re: Namespaces are one honking great idea BartC <bc@freeuk.com> - 2016-07-01 15:49 +0100
    Re: Namespaces are one honking great idea Chris Angelico <rosuav@gmail.com> - 2016-07-02 03:13 +1000
    Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-02 03:46 +1000
    Re: Namespaces are one honking great idea Rustom Mody <rustompmody@gmail.com> - 2016-07-01 19:26 -0700
  Re: Namespaces are one honking great idea Ethan Furman <ethan@stoneleaf.us> - 2016-07-01 09:00 -0700
    Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-02 03:10 +1000
      Re: Namespaces are one honking great idea Ethan Furman <ethan@stoneleaf.us> - 2016-07-01 12:29 -0700
        Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-02 11:07 +1000
          Re: Namespaces are one honking great idea Kevin Conway <kevinjacobconway@gmail.com> - 2016-07-02 01:50 +0000
            Re: Namespaces are one honking great idea Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-01 19:55 -0700
            Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-03 13:22 +1000
          Re: Namespaces are one honking great idea Random832 <random832@fastmail.com> - 2016-07-02 00:59 -0400
          Re: Namespaces are one honking great idea Kevin Conway <kevinjacobconway@gmail.com> - 2016-07-02 15:34 +0000
            Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-03 13:44 +1000
              Re: Namespaces are one honking great idea Ethan Furman <ethan@stoneleaf.us> - 2016-07-02 22:14 -0700
              Re: Namespaces are one honking great idea Kevin Conway <kevinjacobconway@gmail.com> - 2016-07-03 22:02 +0000
                Re: Namespaces are one honking great idea Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 16:21 -0700
                Re: Namespaces are one honking great idea BartC <bc@freeuk.com> - 2016-07-04 01:19 +0100
              Re: Namespaces are one honking great idea Ethan Furman <ethan@stoneleaf.us> - 2016-07-03 21:01 -0700
          Re: Namespaces are one honking great idea Ethan Furman <ethan@stoneleaf.us> - 2016-07-02 16:28 -0700
  Re: Namespaces are one honking great idea Chris Angelico <rosuav@gmail.com> - 2016-07-04 21:37 +1000
    Re: Namespaces are one honking great idea Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-04 15:09 -0700
      Re: Namespaces are one honking great idea Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-04 15:11 -0700
  Re: Namespaces are one honking great idea jmp <jeanmichel@sequans.com> - 2016-07-04 17:58 +0200
  Re: Namespaces are one honking great idea Chris Angelico <rosuav@gmail.com> - 2016-07-05 12:58 +1000
    Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-05 13:35 +1000
      Re: Namespaces are one honking great idea Chris Angelico <rosuav@gmail.com> - 2016-07-05 13:47 +1000
        Re: Namespaces are one honking great idea Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-07-05 16:09 +1000
          A nestedmodule decorator (Re: Namespaces are one honking great idea) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-07-05 21:10 +1200
            Improved nestedmodule decorator implementation Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-07-05 21:31 +1200
              Re: Improved nestedmodule decorator implementation Steven D'Aprano <steve@pearwood.info> - 2016-07-05 20:54 +1000
  Re: Namespaces are one honking great idea Steven D'Aprano <steve@pearwood.info> - 2016-07-05 12:34 +1000
  Re: Namespaces are one honking great idea jmp <jeanmichel@sequans.com> - 2016-07-04 13:23 +0200
  Re: Namespaces are one honking great idea carlosjosepita@gmail.com - 2016-07-09 07:05 -0700

csiph-web