Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'encoding': 0.05; 'subject:Python': 0.06; 'string': 0.09; 'ascii': 0.09; 'bytes,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'strings.': 0.09; 'subject:language': 0.09; 'windows,': 0.09; 'developer': 0.10; 'python': 0.11; 'windows': 0.15; '"python': 0.16; 'ascii,': 0.16; 'chance?': 0.16; 'conforming': 0.16; 'encodings': 0.16; 'means:': 0.16; 'meanwhile': 0.16; 'non-ascii': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'repr': 0.16; 'subject: \n ': 0.16; 'subject:programming': 0.16; 'unicode,': 0.16; 'windows?': 0.16; '\xe9crit': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'trying': 0.19; "python's": 0.19; 'replacing': 0.19; 'things.': 0.19; 'thu,': 0.19; '>>>': 0.22; 'code,': 0.22; 'coding': 0.22; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'text,': 0.24; 'unicode': 0.24; 'shown': 0.26; 'subject:/': 0.26; 'asking': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'dec': 0.30; 'code': 0.31; '13,': 0.31; '>>>>': 0.31; 'convince': 0.31; 'view.': 0.31; 'anyone': 0.31; 'fri,': 0.33; 'problem': 0.35; 'agree': 0.35; '(2)': 0.35; 'convert': 0.35; 'no,': 0.35; 'should': 0.36; 'displays': 0.38; 'nov': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'explain': 0.39; 'does': 0.39; '12,': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'tell': 0.60; 'new': 0.61; 'information,': 0.61; 'you.': 0.62; 'back': 0.62; "you've": 0.63; 'email addr:gmail.com': 0.63; 'show': 0.63; 'box,': 0.64; 'managing': 0.66; 'believe': 0.68; 'anything.': 0.68; 'default': 0.69; 'friendly': 0.72; 'secret': 0.74; 'proves': 0.84; '2013,': 0.91; 'approach.': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Experiences/guidance on teaching Python as a first programming language Date: Thu, 12 Dec 2013 11:58:06 -0500 References: <201312090824.25211.gheskett@wdtv.com> <52A78F6F.3060507@stoneleaf.us> <0e74b365-0f34-40dd-9d38-48135e428ec7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 18.189.108.96 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <0e74b365-0f34-40dd-9d38-48135e428ec7@googlegroups.com> 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: 85 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386867501 news.xs4all.nl 2975 [2001:888:2000:d::a6]:52406 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61732 On 12/12/13 11:20 AM, wxjmfauth@gmail.com wrote: > Le jeudi 12 décembre 2013 15:47:40 UTC+1, Chris Angelico a écrit : >> On Fri, Dec 13, 2013 at 1:34 AM, wrote: >> >>> Le jeudi 12 décembre 2013 11:28:35 UTC+1, Chris Angelico a écrit : >> >>>> On Thu, Dec 12, 2013 at 8:17 PM, wrote: >> >>>> >> >>>>> Windows, Py2.(7), ascii. It is not a secret Python uses >> >>>>> ascii for the representation. >> >>>> >> >>>> Actually no, it doesn't. >> >>> >> >>>>>> sys.version >> >>> '2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]' >> >>>>>> sys.stdout.encoding >> >>> 'cp1252' >> >> >> >> What has this to do with ASCII or with Python's internal >> >> representation? All you've proven is that you can convert the repr of >> >> a string back into a byte-string, by replacing "\\xa9" with "\xa9", >> >> and then shown that you can successfully render that as CP-1252 and it >> >> displays as a copyright symbol. Meanwhile when I try the same thing on >> >> my Windows box, the default encoding is cp437, so it throws. Proves >> >> nothing about ASCII, as neither of those encodings is ASCII, and A9 >> >> does not decode as ASCII. >> >> > > > Are you understanding Python by chance? print, __repr__, __str__, > sys.std*.encoding, ... > Are you understanding Windows? CHCP > Are you understanding the coding of the characters? cp1252, cp850, cp437, ... > Before we talk about Unicode, we should talk about the process of convincing people of things. Asking questions won't convince anyone of anything. If you have new information, then present it to us. Presenting it means: show some code, show some bad outcome, and then explain what you you have demonstrated. Be specific about what problem you are showing. You said "Python uses ASCII." Then you showed us Python code with non-ASCII characters. We are confused what you are trying to tell us. Python 2 uses byte strings. Those byte strings can contain any bytes, conforming to any encoding the developer desires. You asserted that it uses ASCII. That is incorrect. We have discussed Unicode with you enough to believe that we are not going to agree with you. You hold a (very) minority view about what Python does with text, and you are not able to convince people of your view. Isn't that frustrating? Perhaps you need a new approach. > Python (2) is managing all this very well. Unfortunately, not in > a friendly way. > > jmf > -- Ned Batchelder, http://nedbatchelder.com