Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Late-binding of function defaults (was Re: What is a function parameter =[] for?) Date: Thu, 26 Nov 2015 08:52:07 +0200 Organization: A noiseless patient Spider Lines: 26 Message-ID: <87oaeh2qy0.fsf@elektro.pacujo.net> References: <87d1v5emhl.fsf@elektro.pacujo.net> <564e6a62$0$1620$c3e8da3$5496439d@news.astraweb.com> <56556DF8.1080407@rece.vub.ac.be> <878u5mns8z.fsf@elektro.pacujo.net> <874mganq2q.fsf@elektro.pacujo.net> <56565822$0$1617$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="26008"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gbD8eckNbdz1cLY2cT6r/" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:DeOsBbv/hnRs0hQZ2MeOwxxe8SQ= sha1:YO7TpINMt2iES/64OqVJQUzVhEY= Xref: csiph.com comp.lang.python:99532 Steven D'Aprano : > Making tuples mutable would break their use as dictionary keys, which is a > *critical* use. No, it wouldn't. Any object that provides __hash__() and __eq__() can be used as a key. Nothing prevents using mutable objects as keys in Python. Egon Spengler: There's something very important I forgot to tell you. Peter Venkman: What? Spengler: Don't use mutable keys. Venkman: Why? Spengler: It would be bad. Venkman: I'm fuzzy on the whole good/bad thing. What do you mean, "bad"? Spengler: Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light. Ray Stantz: Total protonic reversal! Venkman: Right. That's bad. Okay. All right. Important safety tip. Thanks, Egon. Marko