Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Everything good about Python except GUI IDE? Date: Mon, 29 Feb 2016 11:54:36 +1100 Lines: 43 Message-ID: References: <64a6599c-fae1-469d-bcee-875165b3cc7d@googlegroups.com> <56d294f8$0$1604$c3e8da3$5496439d@news.astraweb.com> <62084c14-abd1-4214-af08-70ce8449c83e@googlegroups.com> <6dq5db5j0hg2evl7t334ftdm5sk8n5itge@4ax.com> <93t5db9sib9ldgktrt7523fnis4tgq2uev@4ax.com> <9064f06c-cbd5-4bf4-98d7-24bed0e78c10@googlegroups.com> <90f65ae1-c3d8-4a36-bc9f-860403a0633c@googlegroups.com> <56d39335$0$1622$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de NW29INHS8adaTr/IStsJlAlk9hvXOTQGl9Lg76Hbi0tA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'subject:Python': 0.05; 'feature.': 0.07; 'permissions': 0.07; 'semantic': 0.07; 'tool,': 0.07; 'cc:addr:python-list': 0.09; 'git': 0.09; 'here?': 0.09; 'python': 0.10; 'do,': 0.15; 'interpreter': 0.15; '2016': 0.16; '\\n,': 0.16; '\\r\\n': 0.16; 'decent': 0.16; 'editor,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'metadata.': 0.16; 'pressed': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:GUI': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'memory': 0.17; 'config': 0.18; 'changes': 0.20; 'windows': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'mixed': 0.22; 'uses.': 0.22; 'file.': 0.22; 'am,': 0.23; 'code,': 0.23; 'feb': 0.23; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; "i've": 0.25; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'change,': 0.27; 'translated': 0.27; 'actual': 0.28; 'accidentally': 0.29; 'convert': 0.29; 'code': 0.30; 'run': 0.33; 'changed': 0.33; 'options': 0.33; 'source': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'open': 0.33; 'changing': 0.34; 'file': 0.34; 'worked': 0.34; 'received:google.com': 0.35; 'world,': 0.35; 'text': 0.35; 'question,': 0.35; 'something': 0.35; "isn't": 0.35; 'but': 0.36; 'should': 0.36; 'project': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'data.': 0.36; 'tools,': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'difference': 0.38; 'received:209': 0.38; 'does': 0.39; 'some': 0.40; 'ever': 0.60; 'save': 0.60; 'care': 0.60; 'your': 0.60; 'default': 0.61; 'skip:n 10': 0.62; 'ending': 0.63; 'information': 0.63; 'times': 0.63; 'between': 0.65; 'boss': 0.66; 'content,': 0.66; 'therefore': 0.67; 'choose': 0.68; 'copies.': 0.72; 'treat': 0.72; 'prompt': 0.79; 'chrisa': 0.84; 'idiot': 0.84; 'subject:good': 0.84; 'absolutely': 0.88; 'to:none': 0.91; '*for': 0.91; 'tricky': 0.93 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:cc; bh=ynmuo8twiGQjKLEiNSxHj3o6Wz98deFM1FML2IZJcZA=; b=F9DEJTgcjpo2hl7Ak+Ti/I8bTjSUGL6xFQ4F/Prd7i7jKexmMBm0J1bjsXBzVV438V yPoA0qRsXwYZf3wTXav2Pfn7ywM1IROy1mzJchl6CllmjIofh/BmULsFikNgetlutaQc LIVrwo8k1BCB+7zZBk/44QXa2JZFaj9bDZv15rePof6bdnj9czOFnvNxPG8QKNkmTVPp H5dFiHQXY14uo8KUuB4ZrpjaGaF7voeG/cySmnpIn7eAMweb3CEvar36JcTmFg4U7jc2 CSUAmgt8G/EBVLlKPG9LOvnVrQPel5GV1tRqTQb102pUxdnKRCd0sEjiw4bSLyYohLaV Y1aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=ynmuo8twiGQjKLEiNSxHj3o6Wz98deFM1FML2IZJcZA=; b=HS1MfMbTcGMYmKqtuA8Lqu7ie3IB/J7oBkpiF+52ep9TIzP3kfFzZY85c+hfNpYmt0 sNo2NpAbtxL3tGDHsvUglaMreBeMYPP/UcsGdTrvyAdpaeSAGbPBcNwdsoqpMKhlNg4f nDtZe9AqWlag0RngSFNA/u9sOTIWDhtbjSPK+qfSFQBRhbyQOx8HVPTqSgwTQMYtQQ+7 Rq9imOEyW3la0UfjHf6/+gAyeyAfmhFJKecnfRfBDQkjOtIX/5riQs4ZzFbw63bD/F7n EhxXF4leA0X01UWzNb50mn3F4jManM7ab0O+H15u8lGsAad8oLaz0BpBaCcJ+8o0IB3t ICug== X-Gm-Message-State: AD7BkJKaPWre9QxgfmxsrMIH9bU2ZlZriymqEcBSqr954L7gXgLNY3TqCXQTz7DoKUfDP+HUaoqps5dJEyg7HA== X-Received: by 10.107.47.163 with SMTP id v35mr2881774iov.19.1456707276359; Sun, 28 Feb 2016 16:54:36 -0800 (PST) In-Reply-To: <56d39335$0$1622$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103668 On Mon, Feb 29, 2016 at 11:39 AM, Steven D'Aprano wrote: > If I open a Python file in my editor, accidentally or deliberately change > the content to Ruby code, save and commit, then the VCS obviously should > track the changes because they are actual changes. "Oops, I accidentally pressed Esc-Meta-Alt-R-Q and translated my code into Ruby. Now what?" > Changing line endings is neither a structural nor a semantic change to the > content of the file. It's effectively metadata, not data. The Python > interpreter doesn't care which line ending you use. Neither will decent > text editors. If some tools, like git, do, then that's a weakness of git, > not a feature. Changing the permissions on a 10,000 line file doesn't give > you a 10,000 line diff, and neither should changing the line ending. > > Your VCS absolutely should track line ending changes. In a perfect world, we > should never care about the line ending, but so long as there are users and > tools that cannot transparently deal with one line ending or another, there > may be times were we do care about line endings, and therefore want to > run "git blame" to find out which idiot changed the line ending of my file > to \r. But that should be treated as a metadata change, not a change to the > content. I know it isn't "really" metadata, it's "actually" content, but > regardless, it should be *treated* as metadata. > > Who is the boss here? The user of the tool, or the tool? This is a tricky question, and there's a slight difference between perms and line endings in that it's perfectly possible to have mixed line endings. The normal way to resolve this is to tell git to convert line endings *for text files* such that source control always uses \n, and then individual users get to choose whether to check out with \n or convert to \r\n for their working copies. This destroys any information that had been represented in mixed line endings - but that's information that no project I've ever worked with uses. However, since this is not something that git dares do on its own, it's not the default action - though the Git Windows installer does prompt you to pick those options on installation. Once you tell git to treat line endings the same way ("git config --global core.autocrlf true", if memory serves me), it's not even metadata, it's just non-information. ChrisA