Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python,': 0.02; 'constructor': 0.09; 'factory': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'roy': 0.16; 'exception': 0.16; 'sat,': 0.16; 'wrote:': 0.18; "i've": 0.25; 'meeting': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'class': 0.32; 'received:google.com': 0.35; 'possible': 0.36; 'stopped': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'smith': 0.68; 'subject:skip:o 10': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=/h6GaXozzSEEX3nXp8J8eK648fbMy9Q/RDgc0x5Ct3o=; b=bjVw7i9GJBfgY8+rIhkEUHDP/iXzSPfEZdgU/wPtSHsp1V1rjAOwaohAhBxmWar6cE EndkLQI4B7KxjOkSyvJ8OEfjmsmRlukrakNA6D0vsMwB7IFX8Zjj3sjEqPZIF9r597t5 uRhKnbtjkKTlgTUQQeOVkpKywKonNntD25azB8G2wJLf/TP7fXbHl5us4a0AMWz6R6Sr T6fiSmllF0Oj5tfthyhY8ify8M3Jv28HMRyb5EjzJli3URF5opByrDEBPM3kDkzIVDIm iKjqzDoH+iaVpliC+yMO4GJIl33enQtgd7kMjTDU1CR4FY/tSToW437TFlqw2vjEM3AB refQ== MIME-Version: 1.0 X-Received: by 10.220.187.71 with SMTP id cv7mr1925549vcb.28.1368197216331; Fri, 10 May 2013 07:46:56 -0700 (PDT) In-Reply-To: References: <518a123c$0$11094$c3e8da3@news.astraweb.com> <518b32ef$0$11120$c3e8da3@news.astraweb.com> <518be931$0$29997$c3e8da3$5496439d@news.astraweb.com> <518c5bbc$0$29997$c3e8da3$5496439d@news.astraweb.com> <518c7f8e$0$29997$c3e8da3$5496439d@news.astraweb.com> <518cd360$0$29997$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 11 May 2013 00:46:56 +1000 Subject: Re: object.enable() anti-pattern From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368197225 news.xs4all.nl 15990 [2001:888:2000:d::a6]:57669 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45101 On Sat, May 11, 2013 at 12:37 AM, Roy Smith wrote: > I suppose, if I had a class like this, I would write a factory function > which called the constructor and post-construction initializer. And > then I would make the constructor protected. That sounds like a reasonable plan, with the possible exception of protected. Since meeting Python, I've stopped using private and protected anywhere. ChrisA