Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'win32': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; 'ascii': 0.09; 'lawrence': 0.09; 'prevents': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:language': 0.09; 'windows,': 0.09; 'python': 0.11; 'def': 0.12; 'language.': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:programming': 0.16; '\xe9crit': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'thu,': 0.19; '>>>': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'source': 0.25; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'dec': 0.30; 'code': 0.31; 'url:wiki': 0.31; '>>>>': 0.31; 'url:wikipedia': 0.31; 'award': 0.32; 'no,': 0.35; 'science.': 0.36; 'next': 0.36; 'url:org': 0.36; 'list': 0.37; 'list.': 0.37; 'nov': 0.38; 'outstanding': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'guy': 0.60; 'email addr:gmail.com': 0.63; 'field': 0.63; 'our': 0.64; 'here': 0.66; 'secret': 0.74; 'stunning': 0.84; 'turkish': 0.84; '2013,': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Experiences/guidance on teaching Python as a first programming language Date: Thu, 12 Dec 2013 15:01:39 +0000 References: <201312090824.25211.gheskett@wdtv.com> <52A78F6F.3060507@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-78-147-191-126.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: 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: 75 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386860522 news.xs4all.nl 2910 [2001:888:2000:d::a6]:49958 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61725 On 12/12/2013 14:34, wxjmfauth@gmail.com 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. >> >> >> >> Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit >> >> (Intel)] on win32 >> >>>>> s = "abcd\xa9" >> >>>>> print(s) >> >> abcd© >> >> >> >> The copyright symbol is not in ASCII. Are you suggesting that Python >> >> uses a 7-bit internal representation of this data? Because a quick >> >> squiz at the source code will prove that wrong. This is not ASCII. >> >> > >>>> sys.version > '2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]' >>>> sys.stdout.encoding > 'cp1252' >>>> s = 'abc\xa9' >>>> t = 'abc©' >>>> s > 'abc\xa9' >>>> t > 'abc\xa9' >>>> print s, t, (s, t) > abc© abc© ('abc\xa9', 'abc\xa9') >>>> def HumanStr(o): > t = repr(o) > newt = t.replace('\\xa9', '©') > return newt > >>>> print s, t, (s, t), HumanStr((s, t)) > abc© abc© ('abc\xa9', 'abc\xa9') ('abc©', 'abc©') >>>> > > jmf > > PS I do not insist on "sys.displayhook" > > PS2 I can only congratulate this Turkish guy for > his understanding of Python > I understand that this Turkish guy will be added to the list here http://en.wikipedia.org/wiki/Turing_Award next year for his stunning contribution to the field of computer science. The year after he will win the award again for his outstanding contribution which prevents people from sending double spaced crap to this list. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence