Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!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.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; '22,': 0.09; 'bug': 0.12; 'dict': 0.16; 'dictionaries': 0.16; 'enough.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'integers,': 0.16; 'mutable': 0.16; 'objects.': 0.16; 'people),': 0.16; 'prohibit': 0.16; 'tuple': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'putting': 0.22; "haven't": 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'tuples': 0.31; 'problem': 0.35; 'problem.': 0.35; 'something': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'should': 0.36; 'list': 0.37; 'mapping': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'above,': 0.60; 'gone': 0.61; "you're": 0.61; 'safe': 0.72; 'everything.': 0.84; 'happen!': 0.84; 'subject:Value': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=O01yBApWMAVF7zmIuo9wUG7Z+hzli2ZZHIqNm1GW9po=; b=05Cato4qwGFhTLGIagIn05MKBScsXFGm0l4+4bmv+Z9m2upJZJ9UDUINq4G+GMQXz/ nZHWdqeFT//xYATjkU4ETnwvFsDQd+C9WH0kIr7e4WqEkDaTYy+LmN5p3YXo72J1jCaW HGwM1YL+6VyY+hisDiOP5hzsUJpomjvWHhxbrCQhAS+O+ONOJAsWbs7Riwg9jCkPc6BJ YIxPbuahec/2JjBmatZJlYBr80vw8ei1b7SLygBLZfOgZfP6qjDCbi6RD/W92JTe6Lq0 BZOutSuthOAPZhLnxCaw6xyIOGy5nhJEAoctUU3L4PYJjp8qFwSoGQ+0NEQJYJTWeDi8 Exqg== MIME-Version: 1.0 X-Received: by 10.220.202.197 with SMTP id ff5mr6725785vcb.3.1371865209688; Fri, 21 Jun 2013 18:40:09 -0700 (PDT) In-Reply-To: <51c4fe76$0$29999$c3e8da3$5496439d@news.astraweb.com> 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> Date: Sat, 22 Jun 2013 11:40:09 +1000 Subject: Re: Default Value 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371865217 news.xs4all.nl 15940 [2001:888:2000:d::a6]:43477 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48898 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. ChrisA