Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; 'latter': 0.09; 'lawrence': 0.09; 'newest': 0.09; 'php,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'language.': 0.14; 'create:': 0.16; 'language?': 0.16; 'mildly': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'issue.': 0.22; 'header:User-Agent:1': 0.23; 'replace': 0.24; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; "d'aprano": 0.31; 'post.': 0.31; 'steven': 0.31; 'class': 0.32; "we're": 0.32; 'could': 0.34; 'two': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'son': 0.61; 'our': 0.64; 'charset:windows-1252': 0.65; 'subject:For': 0.78; 'choices:': 0.84; 'horrible': 0.84; 'object:': 0.84; 'received:2': 0.84; 'subject:Make': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: 3 Suggestions to Make Python Easier For Children Date: Sat, 02 Aug 2014 18:29:26 +0100 References: <7ef67ccc-3fc3-47dd-b858-09ef3b57a497@googlegroups.com> <87r40zmkhr.fsf@elektro.pacujo.net> <87mwbnmi7a.fsf@elektro.pacujo.net> <53dd0b30$0$29968$c3e8da3$5496439d@news.astraweb.com> <87k36qzuor.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-2-98-197-203.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <87k36qzuor.fsf@elektro.pacujo.net> 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407000582 news.xs4all.nl 2941 [2001:888:2000:d::a6]:47259 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75542 On 02/08/2014 18:07, Marko Rauhamaa wrote: > Steven D'Aprano : > >> Marko Rauhamaa wrote: >>> __setattr__ could create __dict__ belatedly. >> >> Are we designing Son Of PHP, or a sensible language? *wink* >> >> If object.__setattr__ did this, then we're left with two equally >> horrible choices: > > Not a huge issue. Only mildly annoying to have to create: > > class Object: pass > > in every application. > > And the newest Python releases let you replace that with: > > import types > Object = types.SimpleNamespace > > > Marko > With the latter being part of suggestion #3 in the original post. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence