Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Selik Newsgroups: comp.lang.python Subject: Re: Clean Singleton Docstrings Date: Thu, 7 Jul 2016 23:43:17 -0400 Lines: 13 Message-ID: References: <2EB2D06F-46A1-4812-A91B-1D2A31440EA6@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de sSbVmNTDvMRjSbfxawIX8AGNkqYihK99TOOcqNTuqxAA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.059 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'dict': 0.09; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Singleton': 0.16; 'using,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'enforce': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.24; 'module': 0.25; "i've": 0.25; 'allows': 0.30; 'work.': 0.30; 'received:10.0.0': 0.32; 'message-id:@gmail.com': 0.34; 'received:10.0': 0.34; 'received:google.com': 0.35; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'your': 0.60; 'share': 0.61; 'header:Message-Id:1': 0.61; 'show': 0.62; 'needing': 0.63; 'benefit': 0.66; 'jul': 0.72; 'state.': 0.72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=oMdJHVUL0ooMkdfxOoWB4wuQtq8cTzNr1GkN3a/C8CI=; b=MUTaYgbDM+o8TAb4oT1U7hi/1zlqsjRCBoNRPEeTP0cFrHrH0pUSFqh21uixdC2++X nn4yuSM6Hk5T13SeT/XYfln5AWrAtsAaiWoEcXpwg7tw84ncwVxJ+Zlnd0wNYk/r6MBj z4wVY2kLBXVKUvfK18YgmAiI43LThFnxD9meA98PsUfJbSYr9h3WR8Qg0PH1xj7CiuE7 ar5CAYYLwuitg3izmrjdvwp0yEuPUd1dM5RZASPvAxv62VkuxziW/czvGG9k8c6p/auS ZofKBkPPTaJDgh18bOQibokP8ZAtKwMKLqcGC1/lk8Fc7Hh30bevAr844yyAYODkgYB9 M6Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=oMdJHVUL0ooMkdfxOoWB4wuQtq8cTzNr1GkN3a/C8CI=; b=eAthyDawHy9hjrAaoTZsroMsQqk+dhYn34xIddOpNPM24GkIBstII7D8uIjc48RU6D z4jyBW/nTRO35jAdC9czhQiCjolUEg28uZiQ1wizFBU985HHJlB502zDG/UnIG+2FwI9 MDjZ8G3g1XIXkQSOvYYTS5diXGWMXl8MO8WDXDndSC712YRRCB4DRpGgzHmdZRBNTSsV DbyJLH2VyQgJ6eEDcr6eD5KhYUywXDWBNPCvF/Ix2k3R+o58m80fjbY9n5wdIBkI9gEL SqtutDW7nLuAntiyN7Mr7J5bdSO1H2XpH4Zro1KFc7HROUkEFwZUFEUOMRBt1xN65HtN WIaA== X-Gm-Message-State: ALyK8tL5TJ5DsgtVDFp0yWn+w+1LezcOgVc50kq+DDJ2k+0jSOsUFIuecUG+j0brDKeJ1Q== X-Received: by 10.200.51.76 with SMTP id u12mr5586427qta.55.1467949399759; Thu, 07 Jul 2016 20:43:19 -0700 (PDT) X-Mailer: iPad Mail (13F69) In-Reply-To: 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: <2EB2D06F-46A1-4812-A91B-1D2A31440EA6@gmail.com> X-Mailman-Original-References: Xref: csiph.com comp.lang.python:111199 > On Jul 7, 2016, at 7:46 PM, Rob Gaddi w= rote: >=20 > I've got a package that contains a global ensmartened dict that allows > all the various parts of my program to share state. The simplest solution would be to use a module as your singleton. For exampl= e, "registry.py" would work. Pydoc will show its docstring, and it will have= all the features you had been using, with the added benefit of not needing t= o enforce its singletonness. =20=