Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Kevin Conway 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: References: <57767a97$0$1606$c3e8da3$5496439d@news.astraweb.com> <577693AC.6090807@stoneleaf.us> <5776a3ef$0$1608$c3e8da3$5496439d@news.astraweb.com> <5776C4A4.5000407@stoneleaf.us> <577713c6$0$1587$c3e8da3$5496439d@news.astraweb.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: 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; '>>>': 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; '>': 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <57767a97$0$1606$c3e8da3$5496439d@news.astraweb.com> <577693AC.6090807@stoneleaf.us> <5776a3ef$0$1608$c3e8da3$5496439d@news.astraweb.com> <5776C4A4.5000407@stoneleaf.us> <577713c6$0$1587$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:110925 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 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 th= e > >> idea before taking it to Bikeshedding Central :-) > >> > >> Besides, I expect Python-Ideas will say it needs to be a package on Pp= PI > >> 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 > =E2=80=9CCheer up,=E2=80=9D they said, =E2=80=9Cthings could be worse.=E2= =80=9D So I cheered up, and sure > enough, things got worse. > > -- > https://mail.python.org/mailman/listinfo/python-list >