Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'oct': 0.02; 'attribute': 0.07; 'dict': 0.09; 'through.': 0.09; 'am,': 0.12; 'beneficial.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subscripting': 0.16; 'wrote:': 0.16; 'received:209.85.210.174': 0.18; 'received:mail-iy0-f174.google.com': 0.18; 'header:In-Reply- To:1': 0.22; 'dictionary': 0.23; 'message-id:@mail.gmail.com': 0.29; 'booth': 0.30; 'to:addr:python-list': 0.33; 'describe': 0.34; 'object': 0.35; 'fri,': 0.36; 'but': 0.37; 'could': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; "it's": 0.40; 'where': 0.40; 'thinking': 0.40; 'imagine': 0.71; 'subject:types': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UBrFES9vyzHWoyaCyEcwc5JGHUQPY1cQ190Us5sxxso=; b=DtxxroF7lAMHqFd022Kfun6CmfCDg4WfJgCAqo1XZlyrcxyQaBbtebhDd8ZA5qUtGo F+fGDgL7BNqJYktfm6ZN5E2Xz7klL+lzcQhxGHoNMuZlN1eDyoTpPNgnNdH05cHG0IZp QYC1Ghq3t9WgzAsjxO4FUlApRsiSI4QGMUnQI= MIME-Version: 1.0 In-Reply-To: References: <4ea92dae$0$20639$426a74cc@news.free.fr> Date: Fri, 28 Oct 2011 09:39:34 +1100 Subject: Re: __dict__ attribute for built-in types 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.12 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1319755178 news.xs4all.nl 6942 [2001:888:2000:d::a6]:47392 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15064 On Fri, Oct 28, 2011 at 1:36 AM, Duncan Booth wrote: > Try thinking that one through. Imagine you could set up a dictionary the > way you describe > > A dict with itself as its own __dict__ becomes like a javascript object > where subscripting and attribute access are mostly interchangeable. Yeah; I never said it was a good thing, just that it's possible. "Everything is permissible" - but not everything is beneficial. "Everything is permissible" - but not everything is constructive. (1 Corinthians 10:23, NIV translation.) ChrisA