Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61708

Re: Experiences/guidance on teaching Python as a first programming language

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 <python-python-list@m.gmane.org>
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; 'offline': 0.03; '"this': 0.03; 'beginner': 0.05; 'encoding': 0.05; 'subject:Python': 0.06; 'elegant': 0.07; 'encoded': 0.07; 'plenty': 0.07; 'utf-8': 0.07; 'ascii': 0.09; 'assumed': 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; 'sure,': 0.09; 'windows,': 0.09; 'wrong,': 0.09; 'python': 0.11; 'language,': 0.12; 'wrote': 0.14; 'language.': 0.14; 'windows': 0.15; '(?).': 0.16; '(file': 0.16; '[*]': 0.16; 'ascii,': 0.16; 'brilliant': 0.16; 'declared': 0.16; 'did,': 0.16; 'encodings': 0.16; 'filesystem': 0.16; 'folks,': 0.16; 'incorrect': 0.16; 'knight': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:programming': 0.16; 'sytem': 0.16; 'unicode.': 0.16; '\xe9crit': 0.16; 'language': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'bit': 0.19; 'acquired': 0.19; 'pointed': 0.19; 'solution.': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; '2.1': 0.24; 'byte': 0.24; 'recognize': 0.24; 'speakers.': 0.24; 'unicode': 0.24; 'non': 0.24; '---': 0.24; 'source': 0.25; '2.0': 0.26; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'record': 0.27; 'idea': 0.28; 'chris': 0.29; 'url:bugs': 0.29; 'am,': 0.29; 'possibility': 0.29; 'dec': 0.30; 'along': 0.30; "i'm": 0.30; 'code': 0.31; 'towards': 0.31; 'about.': 0.31; 'clever': 0.31; 'fighting': 0.31; 'idea,': 0.31; 'piece': 0.31; 'file': 0.32; 'text': 0.33; 'linux': 0.33; 'url:python': 0.33; 'ago': 0.33; 'beginning': 0.33; 'guess': 0.33; 'reader': 0.33; "i'd": 0.34; 'problem': 0.35; 'display': 0.35; 'skip:u 20': 0.35; 'beyond': 0.35; 'but': 0.35; 'data,': 0.36; 'impression': 0.36; 'doing': 0.36; 'url:org': 0.36; 'should': 0.36; 'example,': 0.37; 'too': 0.37; 'clear': 0.37; 'expected': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'fact': 0.38; 'pm,': 0.38; 'little': 0.38; 'bad': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'guy': 0.60; 'problems.': 0.60; 'solve': 0.60; 'then,': 0.60; 'tell': 0.60; 'extended': 0.61; 'simply': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'such': 0.63; 'our': 0.64; 'taking': 0.65; 'talking': 0.65; 'details': 0.65; 'experience.': 0.67; 'shortly': 0.68; 'fact,': 0.69; 'wish': 0.70; 'engage': 0.74; 'secret': 0.74; 'theoretical': 0.74; 'introduce': 0.78; 'glad': 0.83; 'fascinating,': 0.84; 'issues:': 0.84; 'start.': 0.84; 'storytelling': 0.84; 'turkish': 0.84; 'wish.': 0.84; 'story,': 0.91; 'why?': 0.91; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: Experiences/guidance on teaching Python as a first programming language
Date Thu, 12 Dec 2013 08:52:21 -0500
References <CAHVvXxS23g8dxO23pPTmXLo0z=QzJY_CjwMUtJcvAVfRhZa8bA@mail.gmail.com> <201312090824.25211.gheskett@wdtv.com> <52A78F6F.3060507@stoneleaf.us> <CABicbJKoN9fV48yskd5wqE79vsb5=nPGfwgOTCO+fCFMG7g8qw@mail.gmail.com> <mailman.3872.1386751441.18130.python-list@python.org> <d0aef6f2-9091-4f27-b378-8e24257d3983@googlegroups.com> <mailman.3882.1386758747.18130.python-list@python.org> <f62baa3e-d286-4f7b-b6db-71cafb0523d3@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 <f62baa3e-d286-4f7b-b6db-71cafb0523d3@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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3987.1386856353.18130.python-list@python.org> (permalink)
Lines 106
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386856353 news.xs4all.nl 2969 [2001:888:2000:d::a6]:33658
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61708

Show key headers only | View raw


On 12/12/13 4:17 AM, wxjmfauth@gmail.com wrote:
> Le mercredi 11 décembre 2013 11:45:43 UTC+1, Chris Angelico a écrit :
>> On Wed, Dec 11, 2013 at 7:43 PM, Chris Angelico <rosuav@gmail.com> wrote:
>>
>>> When you tell a story, it's important to engage the reader from the
>>
>>> start.
>>
>>
>>
>> On Wed, Dec 11, 2013 at 8:39 PM,  <wxjmfauth@gmail.com> wrote:
>>
>>> A few practical considerations, far away from theoretical
>>
>>> aspects. Mainly for non ascii, understand non native English
>>
>>> speakers.
>>
>>
>>
>> And then, shortly after the beginning of the story, you need to
>>
>> introduce the villain. Thanks, jmf, for taking that position in our
>>
>> role-play storytelling scenario! A round of applause for jmf, folks,
>>
>> for doing a brilliant impression of the uninformed-yet-fanatical
>>
>> Knight Templar villain!
>>
>
> I know Python since ver. 1.5.6 and used it intensively
> since ver. 2.0 or 2.1 (?). I acquired some user experience.
>
> Windows, Py2.(7), ascii. It is not a secret Python uses
> ascii for the representation.

It is incorrect that Py2.x uses ASCII strings.  It uses byte strings. 
Source files are assumed to be encoded in ASCII, so byte strings often 
are ASCII.  But as Chris has pointed out, bytestrings can hold any byte 
data, including UTF-8 if you wish.

JMF, I think you are clever enough and care enough about these issues to 
get this straight.

Many people seem to like the Pragmatic Unicode presentation I did, it 
may clear up some issues:  http://nedbatchelder.com/text/unipain.html

I'd be glad to have an extended conversation with you offline if you 
don't want to get into details here.

> As an example, this guy
> who some time ago exposed his own solution to solve that
> problem (btw, elegant and correct). ---  you wrote blah, blah
> about his "mysterious code point", you did not recognize
> he is (was) using Turkish Windows with the code
> page cp1254 ---. It is a little bit fascinating, 20 years
> after the creation a language, people are still fighting
> to write text in a human way.

"This guy": I have no idea who you are talking about.

>
> Unicode. For a first language, it may be not a bad idea
> to use a language which uses "unicode à la unicode".
>
> Windows, Py3, unicode. It is is infortunate, but it is
> a fact Python has some problems with that platform (file
> sytem encoding), -> potential problems which should not
> exist for a beginner.

File system encodings are very difficult.  Linux uses byte strings for 
file names, with no attempt to record the encoding, so there's a strong 
possibility that the declared encoding for the filesystem is wrong, or 
that your guess at the encoding will be wrong.

> I am the first to recognize the win console is all but
> friendly. If one wishes to use a unicode code page, Python
> fails [*].

Yes, the Windows console and Python don't get along well with Unicode. 
This is a long-standing ticket: http://bugs.python.org/issue1602  I'm 
sure they would welcome your contribution towards a solution.  When I 
use Windows, I often wish this were solved.

>
> Python has plenty of good qualities, you (and others)
> are discussing plenty of theoretical aspects.
> I'm pointing the fact, one may be stuck simply because
> one cannot display a piece of of text!
> I'm not so sure, such a behaviour is expected from a
> beginner learning a computer language.
>
>
> [*] I toyed with go(lang) and ruby 2 (only in a unicode
> perspective), I should say I had no problems. Why? No
> idea, it is too far beyond my knowlege.
>
> jmf
>
>


-- 
Ned Batchelder, http://nedbatchelder.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-11 19:43 +1100
  Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-11 01:39 -0800
    Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-11 10:05 +0000
    Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-11 21:45 +1100
      Re: Experiences/guidance on teaching Python as a first programming language alex23 <wuwei23@gmail.com> - 2013-12-12 15:38 +1000
      Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-12 01:17 -0800
        Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 21:28 +1100
          Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-12 06:34 -0800
            Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-13 01:47 +1100
              Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-12 08:20 -0800
                Re: Experiences/guidance on teaching Python as a first programming language Ned Batchelder <ned@nedbatchelder.com> - 2013-12-12 11:58 -0500
            Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 15:01 +0000
        Re: Experiences/guidance on teaching Python as a first programming language Ned Batchelder <ned@nedbatchelder.com> - 2013-12-12 08:52 -0500
        Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 14:30 +0000
        Re: Experiences/guidance on teaching Python as a first programming language Terry Reedy <tjreedy@udel.edu> - 2013-12-12 12:55 -0500
          Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-13 08:15 -0800
            Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-14 03:27 +1100
              Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-13 10:27 -0800
                Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-14 05:32 +1100
                Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-13 11:30 -0800
            Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-13 16:39 +0000
            Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-14 03:43 +1100
              Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-13 08:54 -0800
                Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-14 03:57 +1100
            Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-13 17:02 +0000
            Re: Experiences/guidance on teaching Python as a first programming language Terry Reedy <tjreedy@udel.edu> - 2013-12-13 17:49 -0500
              Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-14 09:58 +0000
            Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-13 23:10 +0000
            Re: Experiences/guidance on teaching Python as a first programming language Terry Reedy <tjreedy@udel.edu> - 2013-12-13 18:30 -0500
              Re: Experiences/guidance on teaching Python as a first programming language wxjmfauth@gmail.com - 2013-12-14 06:03 -0800
                Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-15 01:15 +1100
                Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-14 14:38 +0000
                CP65001 fails (was re: ...) Terry Reedy <tjreedy@udel.edu> - 2013-12-14 13:43 -0500
                Re: CP65001 fails (was re: ...) wxjmfauth@gmail.com - 2013-12-14 12:48 -0800
                Re: CP65001 fails (was re: ...) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-14 21:05 +0000
                Re: CP65001 fails (was re: ...) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-14 22:51 +0000
                Re: CP65001 fails (was re: ...) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-14 23:32 +0000
                Re: CP65001 fails (was re: ...) rusi <rustompmody@gmail.com> - 2013-12-14 20:42 -0800
                Re: CP65001 fails (was re: ...) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-15 05:00 +0000
                Re: CP65001 fails (was re: ...) rusi <rustompmody@gmail.com> - 2013-12-14 21:24 -0800
                Re: CP65001 fails (was re: ...) Chris Angelico <rosuav@gmail.com> - 2013-12-15 15:48 +1100
                Re: CP65001 fails (was re: ...) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-15 14:25 +0000
                Re: CP65001 fails (was re: ...) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-15 02:39 +0000
                Re: CP65001 fails (was re: ...) Terry Reedy <tjreedy@udel.edu> - 2013-12-15 00:07 -0500
                Re: CP65001 fails (was re: ...) wxjmfauth@gmail.com - 2013-12-15 00:26 -0800
            Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-14 10:38 +1100
            Re: Experiences/guidance on teaching Python as a first programming language Ethan Furman <ethan@stoneleaf.us> - 2013-12-13 15:17 -0800
            Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-13 23:58 +0000
              Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-14 10:00 +0000
                Re: Experiences/guidance on teaching Python as a first programming language Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-14 13:21 +0000
    Re: Experiences/guidance on teaching Python as a first programming language Steve Simmons <square.steve@gmail.com> - 2013-12-11 12:33 +0100
    Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-11 23:02 +1100
    Re: Experiences/guidance on teaching Python as a first programming language Steve Simmons <square.steve@gmail.com> - 2013-12-11 13:30 +0100
  Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-11 11:17 +0000

csiph-web