Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: 3 Suggestions to Make Python Easier For Children Date: Sat, 02 Aug 2014 20:07:48 +0300 Organization: A noiseless patient Spider Lines: 23 Message-ID: <87k36qzuor.fsf@elektro.pacujo.net> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="12427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZIiVVMhnIKaBiZDcyVt89" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:C58um3t5UuHIVeuBEmd78E1Jefo= sha1:AwVkDK3rt4U7RFWBAhaKCgiCJXQ= Xref: csiph.com comp.lang.python:75541 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