Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'programmer': 0.03; '"this': 0.03; 'languages.': 0.04; 'argument': 0.05; 'mrab': 0.05; 'passionate': 0.05; 'say,': 0.05; '21,': 0.07; 'pypi': 0.07; 'users,': 0.07; 'acceptance': 0.09; 'arguments': 0.09; 'explanation': 0.09; 'fixed,': 0.09; 'friday,': 0.09; 'happen.': 0.09; "they've": 0.09; 'utilizing': 0.09; 'python': 0.11; 'language,': 0.12; 'language.': 0.14; '_do_': 0.16; 'backwards': 0.16; 'believes': 0.16; 'discussion.': 0.16; 'fork': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'hmm.': 0.16; 'measured': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'mutability': 0.16; 'mutable': 0.16; 'once.': 0.16; 'perfect.': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'subroutine': 0.16; 'tends': 0.16; 'think.': 0.16; 'troll': 0.16; ':-)': 0.16; 'language': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'obviously': 0.18; 'users.': 0.18; 'bit': 0.19; 'module': 0.19; 'basically': 0.19; 'passing': 0.19; 'meant': 0.20; 'seems': 0.21; 'saying': 0.22; 'creating': 0.23; 'header:User-Agent:1': 0.23; 'source': 0.25; 'developers': 0.25; 'solutions.': 0.26; 'suggested': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'points': 0.29; 'statement': 0.30; 'waste': 0.30; "i'm": 0.30; 'getting': 0.31; 'agreed.': 0.31; 'breaking': 0.31; 'explained': 0.31; 'fighting': 0.31; 'idea,': 0.31; 'anyone': 0.31; 'me?': 0.32; "we're": 0.32; 'worked': 0.33; 'not.': 0.33; 'plain': 0.33; 'programmers': 0.33; '"the': 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'knows': 0.35; 'something': 0.35; 'johnson': 0.35; 'received:84': 0.35; 'but': 0.35; 'there': 0.35; 'done': 0.36; 'doing': 0.36; "didn't": 0.36; 'thanks': 0.36; "i'll": 0.36; 'possible': 0.36; 'should': 0.36; 'experience,': 0.37; 'members.': 0.37; 'so,': 0.37; 'sometimes': 0.38; 'process,': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'explain': 0.39; 'does': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'most': 0.60; 'break': 0.61; 'lost': 0.61; 'new': 0.61; 'skip:* 10': 0.61; "you're": 0.61; 'first': 0.61; 'back': 0.62; 'developed': 0.63; 'personal': 0.63; 'such': 0.63; 'become': 0.64; 'more': 0.64; 'wall': 0.65; 'air': 0.66; 'worth': 0.66; 'here': 0.66; 'reply': 0.66; 'it!': 0.67; 'header :Reply-To:1': 0.67; 'believe': 0.68; 'sound': 0.68; 'default': 0.69; 'reply-to:no real name:2**0': 0.71; 'honest': 0.78; 'yourself': 0.78; 'gain': 0.79; 'discover': 0.82; 'everything,': 0.84; 'examples.': 0.84; 'foes': 0.84; 'perceive': 0.84; 'reply- to:addr:python.org': 0.84; 'subject:Value': 0.84; 'mistake': 0.91; 'sorry.': 0.91; 'thing,': 0.91; 'rick': 0.93; '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=ceaUf6gBqVuhAZZaKdIA:9 a=wPNLvfGTeEIA:10 X-AUTH: mrabarnett:2500 Date: Sat, 22 Jun 2013 20:36:30 +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> <49116823-a628-4689-8584-2e24f33ed65c@googlegroups.com> In-Reply-To: <49116823-a628-4689-8584-2e24f33ed65c@googlegroups.com> 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: 101 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371929977 news.xs4all.nl 15951 [2001:888:2000:d::a6]:49263 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48944 On 22/06/2013 03:32, Rick Johnson wrote: > On Friday, June 21, 2013 8:54:50 PM UTC-5, MRAB wrote: >> On 22/06/2013 00:51, Rick Johnson wrote: >> > On Friday, June 21, 2013 5:49:51 PM UTC-5, MRAB wrote: >> > My argument has always been that mutables should not be >> > passed into subroutines as default arguments because bad >> > things can happen. [...] I also believe that a programmer >> > should not be prevented from passing mutable default >> > arguments [...] >> So, having mutables as default arguments is a bad idea, >> but a programmer should not be prevented from doing that, >> and a warning message should be printed on such occasions. > > Well i'll admit that does sound like a contradiction. > Basically i meant, programmers should be *discouraged* from > passing mutables as default arguments but not *prevented*. > Of course, utilizing a stateless subroutine like i suggest, > argument mutability would not matter. > > Sometimes when you're passionate about something your > explanations become so verbose as to render your idea lost > in the noise. Obviously i made that mistake here :) > Yes, a more measured explanation tends to work better. :-) > In my last reply to Rotwang i explained the functionality i > seek to achieve in a set of three interactive examples. > Take a look at those and let me know what you think. > Hmm. Like they say, "The devil's in the details". As with the mutability thing, I need to think about it some more. Sometimes it seems straight-forward, until you try to do it! :-) >> > Why should i help the developers of this language. What have >> > they done for me? >> >> They've developed this language, and provided it for free. >> They've even released the source code. You perceive flaws >> that you say must be fixed, but you're not going to help >> to fix them. > > Agreed. And i am thankful for everyone's contributions. I > can be a bit harsh sometimes but my intention has always > been to improve Python. > >> I _do_ want you to help to improve the language, and I >> don't care if you don't get it right first time. I didn't >> get it right first time when I worked on the regex module >> (I think that what I have on PyPI is my _third_ attempt!). > > Well thanks for admitting you are not perfect. I know i am > not. We all had to start somewhere and anyone who believes > he knows everything is most assuredly a fool. Learning is > a perpetual process, same for software evolution. > >> > You want to gain my respect? Then start engaging in honest >> > debates. Start admitting that yes, somethings about Python >> > are not only undesirable, they're just plain wrong. >> Python isn't perfect, but then no language is perfect. >> There will always be compromises, and the need to maintain >> backwards compatibility means that we're stuck with some >> "mis-features", but I think it's still worth using; I >> still much prefer it to other languages. > > I understand. We can't break backwards compatibility for > everything, even breaking it for some large flaws could > cause a fatal abandonment of the language by long time > users. > > I just don't understand why i get so much hostility when i > present the flaws for discussion. Part of my intention is to > air the flaw, both for new users and old users, but a larger > intention is to discover the validity of my, or others, > possible solutions. > The problem is in _how_ you do it, namely, very confrontationally. You call yourself "RantingRick". People don't like ranting! Instead of saying "This is obviously a flaw, and you're a fool if you don't agree", you should say "IMHO, this is a flaw, and this is how I think it could be fixed". Then, if someone points out a problem in your suggested fix, you can say "OK, I see your point, I'll try to see whether I can think of a way around that". Etc. > And even if that solution involves a fork, that is not a bad > thing. Creating a new fork and then garnering an acceptance > of the new spinoff would lead to at worse, a waste of time > and a huge learning experience, or at best, an evolution of > the language. > >> > Stop calling me a troll when i am not. And not just me, stop >> > calling other people trolls too! Stop using the personal >> > attacks and straw man arguments. > > Sorry. I failed to explain that this statement was meant not > directly for you but as a general statement to all members. > Sometimes i feel like my back is against the wall and i'm > fighting several foes at once. That can lead to me getting > defensive. >