Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; '22,': 0.09; 'bug': 0.12; 'language,': 0.12; 'dict': 0.16; 'dictionaries': 0.16; 'enough.': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'integers,': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'mutable': 0.16; 'objects.': 0.16; 'people),': 0.16; 'prohibit': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'tuple': 0.16; 'variables,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'putting': 0.22; 'header:User- Agent:1': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; "d'aprano": 0.31; 'steven': 0.31; 'tuples': 0.31; 'languages': 0.32; "we're": 0.32; 'problem': 0.35; 'problem.': 0.35; 'something': 0.35; 'objects': 0.35; 'received:84': 0.35; 'but': 0.35; 'really': 0.36; 'should': 0.36; 'list': 0.37; 'mapping': 0.38; 'to:addr:python-list': 0.38; 'functional': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'even': 0.60; 'above,': 0.60; 'gone': 0.61; "you're": 0.61; 'talking': 0.65; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'safe': 0.72; 'everything.': 0.84; 'happen!': 0.84; 'reply-to:addr:python.org': 0.84; 'subject:Value': 0.84; '2013': 0.98 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=RZapVTdv c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=oyR3mlnJdzkA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=Mpz3XJYojt8A:10 a=kZ7UWmmPAAAA:8 a=daAJibelrCKRBSIsqroA:9 a=wPNLvfGTeEIA:10 a=pyH5b1fOeEsA:10 X-AUTH: mrabarnett:2500 Date: Sat, 22 Jun 2013 03:04:18 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Default Value References: <7e6361d5-6619-4aaa-adda-8b5f01bde57f@googlegroups.com> <447dd1c6-1bb2-4276-a109-78d7a067b442@d8g2000pbe.googlegroups.com> <2e92b4c7-31be-40d2-a906-ab19f3630dfa@googlegroups.com> <51c477dd$0$29999$c3e8da3$5496439d@news.astraweb.com> <565a1c8f-6fd9-4bab-9834-076eaea527f8@googlegroups.com> <7e1ed740-df18-4978-b11d-8ca9c4b5bd04@googlegroups.com> <51c4fe76$0$29999$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371866659 news.xs4all.nl 15945 [2001:888:2000:d::a6]:40070 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48906 On 22/06/2013 02:40, Chris Angelico wrote: > On Sat, Jun 22, 2013 at 11:31 AM, Steven D'Aprano > wrote: >> Thinking about this, I think that the only safe thing to do in Rickython >> 4000 is to prohibit putting mutable objects inside tuples. Putting a list >> or a dict inside a tuple is just a bug waiting to happen! > > I think you're onto something here, but you really haven't gone far > enough. Mutable objects *anywhere* are a problem. The solution? > Abolish mutable objects. Strings (bytes and Unicode), integers, > decimals (floats are a problem to many people), tuples of the above, > and dictionaries mapping any of the above to any other of the above, > should be enough to do everything. > Pure functional languages don't have mutables, or even variables, but then we're not talking about a pure functional language, we're talking about Python.