Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Experiences/guidance on teaching Python as a first programming language

508 views
Skip to first unread message

Oscar Benjamin

unread,
Dec 9, 2013, 7:23:41 AM12/9/13
to Python List
Hi all,

I work in a University Engineering faculty teaching, among other
things, programming. In our last meeting about improving our teaching
syllabus and delivery we've identified the first year programming
courses as an area where there is room for improvement and we're
considering (mainly on my suggestion) switching to using Python as the
first programming language that we use to introduce our students to
programming. I'm interested to know if anyone can share experience of
a similar situation or can point to any case studies about this.

The course is for ~100 1st year students with half studying
Engineering Mathematics and the other half Electrical Engineering.
Currently we introduce programming with C for the 1st semester and
then C++ for the 2nd semester. In the 3rd semester they learn Matlab
and following on from that they can take optional units run by the CS
department in Java, Haskell and many more. Our faculty does not
currently offer any Python courses for students at any level in CS or
Engineering.

Many of the students complain that the C course is too hard and my
experience is that it doesn't equip them with the general
understanding of programming that we really want them to get from the
first programming course. I'm not sure about the Electrical
Engineering students but the Engineering Mathematics students tend not
to use C/C++ once they have covered Matlab and just use Matlab for all
future projects, including in situations where it is highly
inappropriate.

In our recent meeting I proposed that Python should be the first
programming language, and others proposed that Java should be the
second. So we're currently evaluating the option of having Python in
the first semester followed by Java in the second. Both courses would
have to be created from scratch meaning that we would need to draw a
complete outline and syllabus by mid-January in order to roll this out
for the next academic year.

I think that the benefits of this would be that using an "easy"
language would be less distracting while we introduce the general
concepts of programming. What we really want is for the students to
focus on things like "why would I write a program?", "what kind of
things can I do with a program?" and "how would I go about writing a
program that does X?". Ideally by the end of the course we want that,
given a description of a simple command line program that would
perhaps calculate something or do some simple data processing, then
the students would feel confident that they could do that. I think
that using C distracts them from learning these more important general
lessons as they struggle with simple things like how to print output,
or avoid segmentation faults. Also ideally they would continue to use
the language, where appropriate, for subsequent project work (which is
when they would *really* learn the language).

Some of the objections to the idea that were voiced in the meeting were that:
1) Some people felt that Python is not an "industry standard" unlike
C/C++/Java and that it is not as good for employability.
2) Students should learn to program in a statically typed language
because it leads to good programming discipline.
3) Python is too close to Matlab (which is considered essential for
some industries our students often go in to).
4) It is better for students to be introduced to programming with a
low-level language so that they gain a better understanding of how
computers "really work".
5) Learning to program "should be painful" and we should expect the
students to complain about it (someone actually said that!) but the
pain makes them better programmers in the end.

I'm particularly interested to know if anyone can share experience of
switching to teaching Python as a first programming language in a
similar context. A written up case study that I could circulate among
the relevant staff would be especially useful.


Thanks in advance,
Oscar

Gene Heskett

unread,
Dec 9, 2013, 8:24:25 AM12/9/13
to pytho...@python.org
On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine:
I toss out that

1. a semester is insufficient to gain a working familiarity with either
python or java. And neither should be introduced until a decent foundation
has been laid.

2. If you want to start at the nuts and bolts level, (and you should) then
nothing can compare with a semester or more in assembly language for an
easy to learn 8/16 bit mcu like a 6809. IMO learning the Intel assembly
for the 8088 and its git, or even the higher level motorola stuff is
counter productive because they get lost in the details that are really
best handled by a compiler. We actually have a reasonably complete, unix
like OS for that mcu, used to be os9 30 years ago, migrated to community
supported now and called Nitros9 as we have about doubled its speed over
the original. I helped in its conversion to run on the smarter 6309, and
I've written some of its lesser used drivers, like a serial mouse.

Once they get the concept of doing operations on registers they have loaded
with data, and then storing the result, possibly for further use in another
block of code, C will be much easier to teach well as that background will
give them the ability to treat C as a higher level, but still close to
assembly language. The student can easily envision what C is doing,
statement by statement, which will help comprehension, a lot.

Then spend at least a semester on methods of looking at a problem, breaking
it down into pieces to solve, then organizing the code to solve that
problem, which if done right, should result in their having a view that
might even be language independent. This can't help but be good in the
long run. The ability to compose a block diagram with the flow, will
result in a student whose code will be a lot closer to correct right out of
the gate as opposed to the student and prof doing 2 weeks of back and forth
until he, sometimes accidentally, finally gets it right. By that time both
are cross-eyed from looking at so much code that doesn't work well.
Here is where the truly high level language like python or java enters the
conversation.

My $0.02, in 1934 dollars of course. ;-)

Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

All God's children are not beautiful. Most of God's children are, in fact,
barely presentable.
-- Fran Lebowitz, "Metropolitan Life"
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.

Chris Angelico

unread,
Dec 9, 2013, 8:27:39 AM12/9/13
to Python List
On Mon, Dec 9, 2013 at 11:23 PM, Oscar Benjamin
<oscar.j....@gmail.com> wrote:
> 1) Some people felt that Python is not an "industry standard" unlike
> C/C++/Java and that it is not as good for employability.

Disprove that by checking any job listing site in your area/industry.
You'll find plenty of Python jobs there.

ChrisA

Larry Martell

unread,
Dec 9, 2013, 8:39:36 AM12/9/13
to Gene Heskett, pytho...@python.org
>> that: 1) Some people felt that Python is not an "industry standard"
>> unlike C/C++/Java and that it is not as good for employability.
I agree with Gene on the benefit of knowing a low level language and
having experience with the hardware and top-down analysis. I went to
college in the late 70's and I find my knowledge of those things helps
me tremendously when debugging. I think college isn't as much to teach
you specific things as it is to teach you how to learn (especially in
this industry). I've encountered many kids today who come out of
school, and think java is the only language and they have no design
skills and no knowledge of how the machine actually works.

rusi

unread,
Dec 9, 2013, 8:54:34 AM12/9/13
to
On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote:
> Hi all,

> I work in a University Engineering faculty teaching, among other
> things, programming. In our last meeting about improving our teaching
> syllabus and delivery we've identified the first year programming
> courses as an area where there is room for improvement and we're
> considering (mainly on my suggestion) switching to using Python as the
> first programming language that we use to introduce our students to
> programming. I'm interested to know if anyone can share experience of
> a similar situation or can point to any case studies about this.

1 Some Background
=================

Early in my teaching career - 1988 -- I experienced what it means to
switch from Pascal to Scheme to teach programming. And in 2002 I
swtiched to using python. I may talk a bit about this but before
that…


2 Some Philosophical Context
============================

Some years ago I read in a book (I think it was called "Heart of
Philosophy") about the difference between 'ideas' and 'concepts.'
Ideas are large vague touchy-feely things like freedom, love, justice
etc; things that matter but poets deal with better than intellectuals.
Concepts are the basic currency for an academic. In a typical 1-hour
class you deal with a few and in a lifetime you deal with thousands;
in short they are a dime a dozen -- especially if you are an academic.

And yet if you have a conscience you'd know that covering the concepts
specified in a formal printed syllabus is cheating. What really needs
to be conveyed are a few ideas:
- modular code
- code invariants
- abstractions
- Syntax, semantics and the large grey in between which for want of a
better word we may call 'structure'
- Recursion much wider than people think
see http://blog.languager.org/2012/05/recursion-pervasive-in-cs.html
- Interpretation
see http://blog.languager.org/2013/08/applying-si-on-sicp.html
- Computable and non-computable
- The meaning and significance of the word 'code'
- (Even more vaguely) beautiful (and ugly) code

Before reading on, I suggest you think what for a while what for you
are important/core ideas and then what vehicles/mediums are
conducive/obstructive to them.


3 My Prejudices
===============

Historically I've been associated with functional programming. While I
am not so passionate about it as when I was half my age. still I'd
say:

- FP *as a philosophy* collects a bunch of stuff -- technology,
practices, culture -- that conduces to good programming even for
kids who after the course never use FP *as a technology*

See http://blog.languager.org/2012/10/functional-programming-lost-booty.html

- By contrast OOP is mostly (at best) clerical common sense --
organizing libraries to be easily searchable is better by data than
by code. At worst OOP is hogwash -- inheritance.

And so…
- Python which can be quite functional, imperative and object oriented
has a rather special place. Because it is object oriented you will
be able to use it to silence those who are subscribed to that
religion. Because it is imperative you can write straightforward
code -- 'scripts' -- without undue fanfare Because it is functional
(well almost -- I have some beefs in this regard) you can use it as
a vehicle to actually convey important *ideas* in short space and
time

- For me Lisp (closely followed by APL) are the ultimate in
programming paradigms. However they are not serious technology in
2013. [Even the birthplace of Scheme -- MIT -- has switched to
python]. And so in 2013 python occupies a sweet spot in the sense of
being academically clean and realistically usable.

- That said there are some important elements of FPLs, most notably a
polymorphic type discipline, that are sorely missing from python.
Unfortunately Haskell is much harder to teach/learn than python and
with each new addition only gets harder. So python remains even
with its lacks, an academically sound language.

4 CS-Edu Writings
=================

My CS-101 syllabus from the early 90s --
uses gofer a predecessor of a predecessor of Haskell
http://www.the-magus.in/Publications/ip.pdf

Some more general CS-Edu related writings, containing strewn about
"FP is a good idea"
http://blog.languager.org/2011/02/cs-education-is-fat-and-weak-1.html
and following 2 posts

------
रुसि मोदि
["Rusi Mody" in devanagari so that GG will not use an obsolete charset]

Roy Smith

unread,
Dec 9, 2013, 11:06:06 AM12/9/13
to
In article <mailman.3776.1386595...@python.org>,
I have access to the resume search feature on careers.stackoverflow.com.
Just for fun, I ran the following searches (for skills advertised by
people who have listed their resumes):

C 1k
C++ 1.3k
Java 1.7k
Python 1.2k

The search qualifiers were "within 200 miles of the United States",
"legal right to work here required", "full time", "exclude students",
and, "only active candidates".

Not sure what the proves, other than these are the languages people who
are looking for jobs know (or at least claim to know).

Gene Heskett

unread,
Dec 9, 2013, 11:10:25 AM12/9/13
to Larry Martell, pytho...@python.org
On Monday 09 December 2013 10:46:42 Larry Martell did opine:

> On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett <ghes...@wdtv.com> wrote:
> > On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine:
> >> Hi all,
> >>
> >> I work in a University Engineering faculty teaching, among other
> >> things, programming. In our last meeting about improving our teaching
> >> syllabus and delivery we've identified the first year programming
> >> courses as an area where there is room for improvement and we're
> >> considering (mainly on my suggestion) switching to using Python as
> >> the first programming language that we use to introduce our students
> >> to programming. I'm interested to know if anyone can share
> >> experience of a similar situation or can point to any case studies
> >> about this.
> >>
> >> were that: 1) Some people felt that Python is not an "industry
> >> standard" unlike C/C++/Java and that it is not as good for
Thanks for the flowers Larry. You just said what I was talking all around,
A college education shouldn't teach you specifics about a narrow subject,
but should teach you _how_ to learn because it truly is a never ending
process that for me, continues to this day as I work on my 80th year here.
And you would be amazed at the college diploma possessing people who think
they can quit learning when they get the diploma and refuse to learn
anything new after that, saying "my hands don't fit the tools".

And while you went to college 40+ years ago to learn that, I learned that
at the School of Hard Knocks aka the working world in the late 40's on.
FWIW, I actually have a diploma from there, got it about 20 years ago. It
is part of Alderson-Broddus University & has been for 50+ years. Along
with a G.E.D. about that same age since I quit school in 1948 or so to go
out and make a living fixing those then brand new things called tv's. I
think I did well at the electronics field in general. Getting a raise you
didn't ask for many times was the icing on the cake that said I was doing
it right, and I was doing it right because I understood the physics that
makes it all work, tube type or solid state.

Now, back to your regularly scheduled bashing of new bees. ;-)

Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

BOFH excuse #24:

network packets travelling uphill (use a carrier pigeon)

Chris Angelico

unread,
Dec 9, 2013, 11:25:55 AM12/9/13
to pytho...@python.org
On Tue, Dec 10, 2013 at 3:06 AM, Roy Smith <r...@panix.com> wrote:
> Not sure what the proves, other than these are the languages people who
> are looking for jobs know (or at least claim to know).

That's the converse of what I was talking about. Employability of a
skill depends on how many employers are looking for that skill;
sightings on resumes aren't quite that. But since people will put on
their resumes what they think employers will actually care about (mine
doesn't mention my ability to use Q-BASIC's CALL ABSOLUTE command to
make use of a mouse), they're going to be at least somewhat connected.
Of course, it might be that stackoverflow careers attracts Python
programmers and something else attracts C programmers, but unless
there's some really major skew, I'd say it's still at least somewhat
valid to point to that and show that Python matters to employment.

ChrisA

rusi

unread,
Dec 9, 2013, 11:57:29 AM12/9/13
to
On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote:
> 5) Learning to program "should be painful" and we should expect the
> students to complain about it (someone actually said that!) but the
> pain makes them better programmers in the end.

Yeah this will get some people's back up -- Atrocious! Preposterous! etc

Change the word 'pain' to 'taxing' 'hard' 'challenge' etc and there is much
truth in it. Here is Joel Spolsky on why Java is a poor language for
this reason: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html

William Ray Wing

unread,
Dec 9, 2013, 12:55:41 PM12/9/13
to Python, rusi, William Ray Wing
> --
> https://mail.python.org/mailman/listinfo/python-list

I'm not sure I agree with either of these points of view. Based on my own personal experience, there is an "Ah HA!" moment[*] when a student understands what it means to decompose a problem into a series of algorithmic steps - after that, the details of the particular programming language are just that, details.

Some students get that quickly and intuitively and some never get there, but that bit of fundamental understanding doesn't require either pain or (necessarily) hard work - it just requires adopting a way of approaching and thinking about problems, a mind-set.

-Bill
------------
* For me it came during a no-credit, no-cost, lunch-time course one of my college math teachers offered for anyone who was interested. The year was 1963, we used McCracken's FORTRAN book as our text, and tested our programs over open weekends at Argonne National Lab, where they had an IBM 1620 they opened to classes like ours a couple of times a month.

Terry Reedy

unread,
Dec 9, 2013, 2:57:18 PM12/9/13
to pytho...@python.org
On 12/9/2013 7:23 AM, Oscar Benjamin wrote:
> Hi all,
>
> I work in a University Engineering faculty teaching, among other
> things, programming. In our last meeting about improving our teaching
> syllabus and delivery we've identified the first year programming
> courses as an area where there is room for improvement and we're
> considering (mainly on my suggestion) switching to using Python as the
> first programming language that we use to introduce our students to
> programming. I'm interested to know if anyone can share experience of
> a similar situation or can point to any case studies about this.

A few years ago, MIT switched from Scheme (which I believe originated at
MIT) to Python for its first course. There might faculty blogs
discussing the reasons. In any case, the course is one of MIT's free
online offerings. There is a draft of a syllabus for your school.
Certainly, most of the concept taught in the current C course could be
taught with Python instead.

--
Terry Jan Reedy

bob gailer

unread,
Dec 9, 2013, 3:53:30 PM12/9/13
to Oscar Benjamin, Python List
On 12/9/2013 7:23 AM, Oscar Benjamin wrote:
[snip]
> I'm interested to know if anyone can share experience of
> a similar situation or can point to any case studies about this.
Taking the opposite perspective from Gene:

I think Python is great as an intro to computing and programming.

Give a student a tool with which he can be productive quickly. and with
minimal effort.

Understanding the real machine may be of interest to some but is not
essential .I'd make that "later" and optional.

Do you teach potential drivers how the engine works before letting them
drive?

Caution: having listened to many students express their suffering on
these lists I recommend:
beta test any course before putting it into production.
be sure you give the student what he needs to understand and take the
next step.
be sure your instructors are willing to help the students.
it is, after all, the job of the instructor to ensure the student succeeds.

Roy Smith

unread,
Dec 9, 2013, 4:32:34 PM12/9/13
to
In article <mailman.3797.1386622...@python.org>,
bob gailer <bga...@gmail.com> wrote:

> Understanding the real machine may be of interest to some but is not
> essential.

Surprisingly (to myself, anyway), I agree.

Languages like C, Fortran, and Java, are fairly close to the machine.
They all expose (C more than the others) fundamental machine features
such as hardware data types (various sizes of ints and floats) and
addresses. Understanding how a computer works gives you added
understanding of how the higher level language you're using works.

But, Python operates at a higher level of abstraction. In a sense,
understanding how a computer works is a hinderance to learning Python.
Look at all the beginner questions we get regarding what

>>> a = 47

means in Python. People have a mental picture of a 32-bit (or maybe
64-bit) integer value 47 being placed into some pre-allocated memory
location, and that interferes with their understanding of what's really
happening in Python. Likewise, they have incorrect expectations about
what happens if that follow that up with

>>> b = a ** 100

Conor Hughes

unread,
Dec 9, 2013, 6:25:39 PM12/9/13
to
Terry Reedy <tjr...@udel.edu> writes:

> A few years ago, MIT switched from Scheme (which I believe originated
> at MIT) to Python for its first course. There might faculty blogs
> discussing the reasons. In any case, the course is one of MIT's free
> online offerings.

Berkeley recently made the same transition. They had been mirroring the
MIT Scheme-based 6.001 quite closely; I believe the Python-based
replacement at Berkeley doesn't concern itself with tracking the new
6.001 at MIT. In any case, much (read: some) ink was spilled and
consternation felt about the transition, but all in all my impression
was that it went OK. IMHO, if you're going to switch from Scheme to
something else for first-time programmers, Python is quite nice, as it
reads exceptionally well and is very close to pseudocode in
appearance sometimes. Of course, given that I didn't learn on Python,
my opinions may be colored by prior experience.

Rhodri James

unread,
Dec 9, 2013, 6:32:12 PM12/9/13
to
On Mon, 09 Dec 2013 12:23:41 -0000, Oscar Benjamin
<oscar.j....@gmail.com> wrote:

> Some of the objections to the idea that were voiced in the meeting were
> that:
> 1) Some people felt that Python is not an "industry standard" unlike
> C/C++/Java and that it is not as good for employability.
> 2) Students should learn to program in a statically typed language
> because it leads to good programming discipline.
> 3) Python is too close to Matlab (which is considered essential for
> some industries our students often go in to).
> 4) It is better for students to be introduced to programming with a
> low-level language so that they gain a better understanding of how
> computers "really work".
> 5) Learning to program "should be painful" and we should expect the
> students to complain about it (someone actually said that!) but the
> pain makes them better programmers in the end.

I have taught Python as a first language to 12-15 year old kids, and for
their purposes (learning how to get computers to do stuff) it was just
fine. In particular, it reads easily (as long as you steer clear of funny
stuff like decorators and metaclasses), so our students found it easier to
explain to themselves what examples did without all the unusual (in
English) punctuation getting in the way.

While your students aren't 12-15 year olds, it sounds rather like what you
want to give them is very similar. Unlike Computer Science students, they
don't need to know how computers "really work" (except in the limited
sense of floating point arithmetic, which is going to give them headaches
however you introduce it). What they need is confidence in manipulating
data and algorithms, and Python's a perfectly good choice for that.

For contrast, my CS degree of >mumble< years antiquity threw a lot of
different languages at us, usually in pairs, to illustrate different
concepts. 6502 assembler showed us the basics of how a computer works,
while System/370 assembler showed how horribly complex those basics can
get; Pascal and BCPL contrasted rigid typing with practically non-existent
typing (something Modula-2 and C didn't do nearly as well); and so on and
so forth. None of this is stuff your students need for their work, so I
wouldn't waste time side-tracking them with it.

--
Rhodri James *-* Wildebeest Herder to the Masses

Roy Smith

unread,
Dec 9, 2013, 6:42:14 PM12/9/13
to
In article <op.w7umbykna8ncjz@gnudebeest>,
"Rhodri James" <rho...@wildebst.demon.co.uk> wrote:

> Pascal and BCPL contrasted rigid typing with practically non-existent
> typing

Wow, you actually used BCPL? I didn't realize the language ever had any
real use. I had only ever heard of it in the context of being a C
precursor, mentioned once in an introduction of a paper and never heard
from again.

Rhodri James

unread,
Dec 9, 2013, 7:00:29 PM12/9/13
to
It probably wasn't an accident that Martin Richards was the lecturer :-)
Seriously, though, it was an excellent teaching language, and a slightly
bastardized version of the compiler was readily available on the communal
BBC Micros.
Message has been deleted

Gregory Ewing

unread,
Dec 10, 2013, 12:25:48 AM12/10/13
to
> On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote:
>
>>5) Learning to program "should be painful" and we should expect the
>>students to complain about it (someone actually said that!) but the
>>pain makes them better programmers in the end.

That's like saying that when teaching woodwork we shouldn't
let people use hammers, we should make them use rocks to
bang nails in, because it will make them better carpenters
in the long run.

--
Greg

Chris Angelico

unread,
Dec 10, 2013, 12:55:32 AM12/10/13
to pytho...@python.org
But in teaching woodwork you SHOULD let people use basic tools, and
not just a CNC lathe. Or in the most extreme sense, putting together
IKEA furniture is not carpentry, and neither is picking from an
extremely limited toolbox programming - which is why "Build a program
without writing a line of code" systems are junk for anything
complicated. (Occasionally, VERY occasionally, it's possible to use
the simple drag-and-drop system to get you 90% of the way, and then
fill in the rest yourself. Usually, you'll end up fighting the system
as soon as you do something the author didn't intend.)

Programming shouldn't be painful just for the sake of making it
painful. But you should be programming, not just solving a Sudoku
puzzle. It should be possible for a programmer to develop a unique
program that does a unique thing, and if that's beyond the scope of
the system, the system isn't a programming system. (Might still be a
useful system, of course, but it's not programming.)

ChrisA

Oscar Benjamin

unread,
Dec 10, 2013, 5:42:53 AM12/10/13
to Terry Reedy, Python List
On 9 December 2013 19:57, Terry Reedy <tjr...@udel.edu> wrote:
> On 12/9/2013 7:23 AM, Oscar Benjamin wrote:
>>
>> Hi all,
>>
>> I work in a University Engineering faculty teaching, among other
>> things, programming. In our last meeting about improving our teaching
>> syllabus and delivery we've identified the first year programming
>> courses as an area where there is room for improvement and we're
>> considering (mainly on my suggestion) switching to using Python as the
>> first programming language that we use to introduce our students to
>> programming. I'm interested to know if anyone can share experience of
>> a similar situation or can point to any case studies about this.
>
>
> A few years ago, MIT switched from Scheme (which I believe originated at
> MIT) to Python for its first course. There might faculty blogs discussing
> the reasons.

Thanks Terry. The best I've found is this:
http://cemerick.com/2009/03/24/why-mit-now-uses-python-instead-of-scheme-for-its-undergraduate-cs-program/

It doesn't really describe why Python was chosen and I can't find any
actual evaluation of how well it worked but I guess if they haven't
backed out of the decision then that says something.

> In any case, the course is one of MIT's free online offerings.
> There is a draft of a syllabus for your school. Certainly, most of the
> concept taught in the current C course could be taught with Python instead.

I guess you mean this:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/

The description there sounds like exactly what we're aiming for:
'''
This subject is aimed at students with little or no programming
experience. It aims to provide students with an understanding of the
role computation can play in solving problems. It also aims to help
students, regardless of their major, to feel justifiably confident of
their ability to write small programs that allow them to accomplish
useful goals. The class will use the Python programming language.
'''

I'll have a bit of a look at that. In our case the course would
probably be called something like "Introduction to [scientific]
programming using Python" so we may want to put more time into
numpy/matplotlib etc than some other courses would.


Oscar

rusi

unread,
Dec 10, 2013, 10:36:19 AM12/10/13
to
On Tuesday, December 10, 2013 4:12:53 PM UTC+5:30, Oscar Benjamin wrote:
> On 9 December 2013 19:57, Terry Reedy wrote:
> > On 12/9/2013 7:23 AM, Oscar Benjamin wrote:
> >> Hi all,
> >> I work in a University Engineering faculty teaching, among other
> >> things, programming. In our last meeting about improving our teaching
> >> syllabus and delivery we've identified the first year programming
> >> courses as an area where there is room for improvement and we're
> >> considering (mainly on my suggestion) switching to using Python as the
> >> first programming language that we use to introduce our students to
> >> programming. I'm interested to know if anyone can share experience of
> >> a similar situation or can point to any case studies about this.
> > A few years ago, MIT switched from Scheme (which I believe originated at
> > MIT) to Python for its first course. There might faculty blogs discussing
> > the reasons.

> Thanks Terry. The best I've found is this:
> http://cemerick.com/2009/03/24/why-mit-now-uses-python-instead-of-scheme-for-its-undergraduate-cs-program/

There's this
http://danweinreb.org/blog/why-did-mit-switch-from-scheme-to-python
which seems to have died -- the internet archive has it here
https://web.archive.org/web/20120429151818/http://danweinreb.org/blog/why-did-mit-switch-from-scheme-to-python

Neither really talks of why python was chosen

In that direction you may want to see why Java has been ousted from CMU:
http://existentialtype.wordpress.com/2011/03/15/teaching-fp-to-freshmen/

Gregory Ewing

unread,
Dec 10, 2013, 4:38:57 PM12/10/13
to
Chris Angelico wrote:
> But in teaching woodwork you SHOULD let people use basic tools, and
> not just a CNC lathe.
>
> Programming shouldn't be painful just for the sake of making it
> painful.

That's the only point I was trying to make. Pain in and
of itself doesn't help anyone to learn anything!

--
Greg

Ethan Furman

unread,
Dec 10, 2013, 5:02:23 PM12/10/13
to pytho...@python.org
On 12/09/2013 05:24 AM, Gene Heskett wrote:
>
> I toss out that
>
> 1. a semester is insufficient to gain a working familiarity with either
> python or java.

I don't know about java, but it would certainly be enough to get a good start in Python.


> 2. If you want to start at the nuts and bolts level, (and you should)

Doesn't sound like they do, as that's causing plenty of problems. In today's world that level of knowledge isn't always
necessary, especially if your degree is not in CS. One of the (many) nice things about Python is one doesn't need to
know that stuff to Get Things Done.

--
~Ethan~

Ethan Furman

unread,
Dec 10, 2013, 4:53:36 PM12/10/13
to pytho...@python.org
On 12/09/2013 08:10 AM, Gene Heskett wrote:
> On Monday 09 December 2013 10:46:42 Larry Martell did opine:
>> On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett wrote:
>>> On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine:

[weapon of mass snippage]

Okay, folks, it's really okay to snip stuff! ;)

--
~Ethan~
Message has been deleted

Denis McMahon

unread,
Dec 10, 2013, 9:16:18 PM12/10/13
to
On Tue, 10 Dec 2013 20:35:47 -0500, Dennis Lee Bieber wrote:

> On Tue, 10 Dec 2013 18:25:48 +1300, Gregory Ewing
> <greg....@canterbury.ac.nz> declaimed the following:

>>That's like saying that when teaching woodwork we shouldn't let people
>>use hammers, we should make them use rocks to bang nails in, because it
>>will make them better carpenters in the long run.

> NAILS????
> Nails were verboten in my high school wood working class...
> We used dowels and glue; chisels to carve dove-tails; etc.

We were allowed to use screws, but they had to be brass, not steel, we
had to drill appropriate clearance and pilot holes, and countersink where
appropriate.

And god help you if you deformed the slot in a brass screw head by over
tightening - I think that may have been why they made us use brass ones
only, so that such damage was easier to spot and more likely to happen.

And yes, I can dovetail, mortise and tenon, dowel etc etc etc.

--
Denis McMahon, denismf...@gmail.com

Devin Jeanpierre

unread,
Dec 11, 2013, 3:34:10 AM12/11/13
to Ethan Furman, comp.lang.python
On Tue, Dec 10, 2013 at 2:02 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> Doesn't sound like they do, as that's causing plenty of problems. In
> today's world that level of knowledge isn't always necessary, especially if
> your degree is not in CS. One of the (many) nice things about Python is one
> doesn't need to know that stuff to Get Things Done.

You don't need to know how to use the brakes to drive to Wal-Mart,
either. "Get Things Done" is not the one and only goal. It ignores
productivity, correctness, ethics... It isn't a bad thing to learn
things that are unnecessary to get the bare minimum accomplished.

-- Devin

Chris Angelico

unread,
Dec 11, 2013, 3:43:52 AM12/11/13
to comp.lang.python
When you tell a story, it's important to engage the reader from the
start. Sometimes that means starting the story in the middle of the
action, and filling in the important-but-less-exciting details later,
when they mean something. [1] Teaching a skill often hits the same
sorts of issues. Rather than explain "This is how to manipulate
registers in a CPU", explain "This is how to print Hello World to the
console" and worry about what exactly the console is (and how
redirection affects it) later. My tutorial on assembly language
programming did the same, though it used a one-character-output
operation so it printed a single asterisk to standard out. (Manually
setting CPU register AX to 0200 and DX to 002A, placing an INT 21
command in memory, and single-stepping it.) Learning how all that
functions - or even what the INT opcode means - came later. Start with
something visible and engaging.

After that, learn/teach as much background as is of interest, and
improve skills. But start with something that gets something done.

[1] http://tvtropes.org/pmwiki/pmwiki.php/Main/InMediasRes

ChrisA

wxjm...@gmail.com

unread,
Dec 11, 2013, 4:39:15 AM12/11/13
to
A few practical considerations, far away from theoretical
aspects. Mainly for non ascii, understand non native English
speakers.

Python is an "ascii oriented product".

Platform. On Windows, the solely version which works
harmoniously with the system is Py 2.7 in a byte string
mode (ie non unicode).

Unicode. Sorry, but Python just becomes a no-go.

The great strength is(are) the Python interactive
interpreter(s). It makes learning this language a game.

jmf
(Not teaching computer stuff, but regulary confrontated
with students and/or potential users).

Mark Lawrence

unread,
Dec 11, 2013, 5:05:13 AM12/11/13
to pytho...@python.org
On 11/12/2013 09:39, wxjm...@gmail.com wrote:
> A few practical considerations, far away from theoretical
> aspects. Mainly for non ascii, understand non native English
> speakers.
>
> Python is an "ascii oriented product".

Sheer unadulterated rubbish.

>
> Platform. On Windows, the solely version which works
> harmoniously with the system is Py 2.7 in a byte string
> mode (ie non unicode).

Fixed in Python 3, especially with the superb work done on PEP 393 and
the FSR.

>
> Unicode. Sorry, but Python just becomes a no-go.

Yawn.

>
> The great strength is(are) the Python interactive
> interpreter(s). It makes learning this language a game.
>

Blimey, got something correct, miracles do happen.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Chris Angelico

unread,
Dec 11, 2013, 5:45:43 AM12/11/13
to pytho...@python.org
On Wed, Dec 11, 2013 at 7:43 PM, Chris Angelico <ros...@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, <wxjm...@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!

ChrisA

Steven D'Aprano

unread,
Dec 11, 2013, 6:17:45 AM12/11/13
to
On Wed, 11 Dec 2013 19:43:52 +1100, Chris Angelico wrote:

> [1] http://tvtropes.org/pmwiki/pmwiki.php/Main/InMediasRes

TV Tropes? You utter, utter bastard.

Must... resist... call... of... TV Tropes...



--
Steven

Steve Simmons

unread,
Dec 11, 2013, 6:33:49 AM12/11/13
to pytho...@python.org

On 11/12/2013 11:45, Chris Angelico wrote:
> 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!
>
> ChrisA

Oi! You!!

I'll have you know I'm a bona fide Knight of the Temple and we're not
(all) villains!
If I catch you calling us villains again, I'll slide up behind you in
the mud and dig you
with my ceremonial sword! ;-)

SteveS

Oscar Benjamin

unread,
Dec 11, 2013, 6:46:50 AM12/11/13
to Chris Angelico, comp.lang.python
On 11 December 2013 08:43, Chris Angelico <ros...@gmail.com> wrote:
> On Wed, Dec 11, 2013 at 7:34 PM, Devin Jeanpierre
> <jeanpi...@gmail.com> wrote:
>
> When you tell a story, it's important to engage the reader from the
> start. Sometimes that means starting the story in the middle of the
> action, and filling in the important-but-less-exciting details later,
> when they mean something. [1] Teaching a skill often hits the same
> sorts of issues. Rather than explain "This is how to manipulate
> registers in a CPU", explain "This is how to print Hello World to the
> console" and worry about what exactly the console is (and how
> redirection affects it) later. My tutorial on assembly language
> programming did the same, though it used a one-character-output
> operation so it printed a single asterisk to standard out. (Manually
> setting CPU register AX to 0200 and DX to 002A, placing an INT 21
> command in memory, and single-stepping it.) Learning how all that
> functions - or even what the INT opcode means - came later. Start with
> something visible and engaging.
>
> After that, learn/teach as much background as is of interest, and
> improve skills. But start with something that gets something done.

I certainly agree with this for our students. Explicit computing
courses make up about 30 credits (~16%) of the whole degree program
for the Engineering Mathematics students (if they don't take
additional optional units). They are however many units that
implicitly require computing skills, so we really need them to be able
to be productive quickly. Some of them will focus on programming and
get really good at it. Some do go on to become programmers but most do
not.

The Electrical Engineering students will subsequently do low-level
programming with registers etc. but at the earliest stage we just want
them to think about how algorithms and programs work before going into
all the hardware specific details.

While reading around this subject I found this interesting (although
verbose) speech from Dijkstra advocating the opposite point of view:
http://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1036.html

This definitely wouldn't work for my students but a friend of mine
studied CS (at Warwick?) and his course worked as Dijkstra describes.
In the first year they don't touch a real programming language or
write any actual programs. They take exams in pseudocode and formal
proofs of correctness. Then after a year of studying algorithms,
linguistics, semantics, proof, mathematics and so on they write their
first hello world program in a real programming language. I don't
really know whether he's any good at programming but he's certainly a
good mathematician.


Oscar

Chris Angelico

unread,
Dec 11, 2013, 7:02:22 AM12/11/13
to pytho...@python.org
Mister Simmons, Mister Simmons! We are not for one moment doubting
your sincerity. It's just your intelligence that's in question. [1]

[1] http://www.thegoonshow.net/scripts_show.asp?title=s06e19_the_jet_propelled_guided_naafi

ChrisA
Attempting to atone for pointing people to TVTropes... or maybe to be
hung for a sheep rather than a lamb....

Larry Martell

unread,
Dec 11, 2013, 7:08:46 AM12/11/13
to pytho...@python.org
On Tue, Dec 10, 2013 at 9:16 PM, Denis McMahon <denismf...@gmail.com> wrote:
> On Tue, 10 Dec 2013 20:35:47 -0500, Dennis Lee Bieber wrote:
>
>> On Tue, 10 Dec 2013 18:25:48 +1300, Gregory Ewing
>> <greg....@canterbury.ac.nz> declaimed the following:
>
>>>That's like saying that when teaching woodwork we shouldn't let people
>>>use hammers, we should make them use rocks to bang nails in, because it
>>>will make them better carpenters in the long run.
>
>> NAILS????
>> Nails were verboten in my high school wood working class...
>> We used dowels and glue; chisels to carve dove-tails; etc.
>
> We were allowed to use screws, but they had to be brass, not steel, we
> had to drill appropriate clearance and pilot holes, and countersink where
> appropriate.

Ohhhh we used to DREAM of using screws! We were given steel shafts and
had to tap the threads into them with our teeth.

Steve Simmons

unread,
Dec 11, 2013, 7:30:45 AM12/11/13
to Chris Angelico, pytho...@python.org
OK, We'll call it a draw. [2 - or is that 1?]

SteveS

[2 - or is that 3? Three shall be the number...]
http://montypython.50webs.com/scripts/Holy_Grail/Scene4.htm


Chris Angelico

unread,
Dec 11, 2013, 7:35:49 AM12/11/13
to comp.lang.python
On Wed, Dec 11, 2013 at 10:46 PM, Oscar Benjamin
<oscar.j....@gmail.com> wrote:
> This definitely wouldn't work for my students but a friend of mine
> studied CS (at Warwick?) and his course worked as Dijkstra describes.
> In the first year they don't touch a real programming language or
> write any actual programs. They take exams in pseudocode and formal
> proofs of correctness. Then after a year of studying algorithms,
> linguistics, semantics, proof, mathematics and so on they write their
> first hello world program in a real programming language. I don't
> really know whether he's any good at programming but he's certainly a
> good mathematician.

Yeah, that's how that sounds. If programming is, to your students, a
tool for mathematical analysis (if code is a kind of super-algebra),
then it's right to take eams in pseudocode and study algorithms before
writing hello world. But if programming is a means of gaining command
of a computer, it's far better to see some results of that. Some
people like the idea of creating games (usually because they've played
so many), so there are courses around that take you from knowing
nothing about code to creating your first game (often in one of those
systems that lets you build an application without writing code,
though, in which case it's not really teaching programming at all).
Personally, I'd rather focus on something that's universal[1] (the
console and "Hello, world!"), but I do see the appeal of "And by the
end of the course, you'll have created a playable game!".

Early in my computing days, I met REXX, and a program called REXXTry.
It provided a basic Read/Eval/Print loop, though the Print part wasn't
very sophisticated (though since REXX didn't have much in the way of
complex types, all that meant was that the display of long strings was
a bit ugly). I ended up creating an Extended REXXTry, partly by adding
a sophisticated input routine courtesy of REXXTT, and then by adding a
pile of custom functions - with the goal of making it the ultimate in
algebraic handlers. It was, in fact, quite a reasonable tool for
playing around with maths; I could sketch a geometric problem on
paper, figure out what I knew and what I needed to know, key stuff
into EREXXTry, and get a result back. Python could do exactly the
same, only way way better (already has support for fractions and
complex numbers, which REXX doesn't), and that would make a fine
introduction to programming... for someone with a background in
algebra.

Different styles for different origins.

ChrisA

[1] Or nearly so. Ironically, many of the systems that don't have a
console available are called "consoles". <voice imitate="Jubal
Early">Does that seem right to you?</voice>

rusi

unread,
Dec 11, 2013, 9:44:49 AM12/11/13
to
On Wednesday, December 11, 2013 5:16:50 PM UTC+5:30, Oscar Benjamin wrote:
> The Electrical Engineering students will subsequently do low-level
> programming with registers etc. but at the earliest stage we just want
> them to think about how algorithms and programs work before going into
> all the hardware specific details.

> While reading around this subject I found this interesting (although
> verbose) speech from Dijkstra advocating the opposite point of view:
> http://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1036.html

> This definitely wouldn't work for my students but a friend of mine
> studied CS (at Warwick?) and his course worked as Dijkstra describes.
> In the first year they don't touch a real programming language or
> write any actual programs. They take exams in pseudocode and formal
> proofs of correctness. Then after a year of studying algorithms,
> linguistics, semantics, proof, mathematics and so on they write their
> first hello world program in a real programming language. I don't
> really know whether he's any good at programming but he's certainly a
> good mathematician.

A government form -- say for filing income tax -- and poetry may both
be in English but one doesn't read them with the same attitude!

Dijkstra talks in so much hyperbole that one does not take him
literally. In particular if you want to take him seriously, you must
not take him literally. [I remember reading somewhere that in CS
arrogance is measured in nano-dijkstras]

I believe there is a truth in the line that Chris and Gene take of
getting students' hands dirty early.
Equally there is truth in Dijkstra's line that students need the habit
of thinking and reflecting before diving in.

Now if you believe that one is clearly more important than the other,
your way is clear.

However what if you want to balance both? Its a challenge...

It is this need to balance that makes functional programming attractive:

- implemented like any other programming language
- but also mathematically rigorous

No python is not strictly a functional language but it can be bent to seem
that way more than C/C++/Java/what-have-you

Grant Edwards

unread,
Dec 11, 2013, 10:05:10 AM12/11/13
to
On 2013-12-11, Dennis Lee Bieber <wlf...@ix.netcom.com> wrote:

>>That's like saying that when teaching woodwork we shouldn't
>>let people use hammers, we should make them use rocks to
>>bang nails in, because it will make them better carpenters
>>in the long run.
>
> NAILS????
>
> Nails were verboten in my high school wood working class...
>
> We used dowels and glue; chisels to carve dove-tails; etc.

GLUE???

--
Grant Edwards grant.b.edwards Yow! When this load is
at DONE I think I'll wash it
gmail.com AGAIN ...

Chris Angelico

unread,
Dec 11, 2013, 10:24:30 AM12/11/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 1:44 AM, rusi <rusto...@gmail.com> wrote:
> It is this need to balance that makes functional programming attractive:
>
> - implemented like any other programming language
> - but also mathematically rigorous

Attractive *to the mathematician*. A more imperative style makes sense
to someone who's grown up with... well, parents...

clean_room()
eat_dinner()

One won't start till the other finishes.

ChrisA

rusi

unread,
Dec 11, 2013, 10:41:32 AM12/11/13
to
On Wednesday, December 11, 2013 8:54:30 PM UTC+5:30, Chris Angelico wrote:
> On Thu, Dec 12, 2013 at 1:44 AM, rusi wrote:
> > It is this need to balance that makes functional programming attractive:
> > - implemented like any other programming language
> > - but also mathematically rigorous

> Attractive *to the mathematician*. A more imperative style makes sense
> to someone who's grown up with... well, parents...

> clean_room()
> eat_dinner()

> One won't start till the other finishes.

Yes its always like that:
When you have to figure 2 (or 10) line programs its a no-brainer that
the imperative style just works.

When the ten becomes ten-thousand, written by a nut who's left you with
code whose semantics is dependent on weird dependencies and combinatorial
paths through the code you start wishing that

- your only dependencies were data dependencies
- "Explicit is better than implicit" dinned into the nut's head

which BTW are the basic tenets of FP.

We have functions in C, in Scheme and in Haskell. The difference is that

- in C its impractical and unrealistic to have all functions as
(mathematical) functions of the arguments
- in Scheme its natural but not enforced
- in Haskell its enforced

The nice thing about python is that one can (kindof) teach it in the
Scheme-like way before showing the C-like side.

Neil Cerutti

unread,
Dec 11, 2013, 10:46:28 AM12/11/13
to pytho...@python.org
On 2013-12-11, Dennis Lee Bieber <wlf...@ix.netcom.com> wrote:
> On Tue, 10 Dec 2013 18:25:48 +1300, Gregory Ewing
><greg....@canterbury.ac.nz> declaimed the following:
> NAILS????
>
> Nails were verboten in my high school wood working class...
>
> We used dowels and glue; chisels to carve dove-tails; etc.

...

You lucky BASTARD!

We had to build bookcases out of banana leaves held together with
our own spittle.

--
Neil Cerutti

Mark Lawrence

unread,
Dec 11, 2013, 10:53:01 AM12/11/13
to pytho...@python.org
On 11/12/2013 15:41, rusi wrote:
>
> When the ten becomes ten-thousand, written by a nut who's left you with
> code whose semantics is dependent on weird dependencies and combinatorial
> paths through the code you start wishing that
>

... he'd not been a Led Zeppelin fan, whereby every
variable/module/function name was based on a song title/album
name/lyric. Thankfully not on my project, it was a mate's. Code ended
up in small, round filing cabinet.

bob gailer

unread,
Dec 11, 2013, 11:01:42 AM12/11/13
to Chris Angelico, comp.lang.python
On 12/11/2013 3:43 AM, Chris Angelico wrote:
> When you tell a story, it's important to engage the reader from the
> start...explain "This is how to print Hello World to the
> console" and worry about what exactly the console is (and how
> redirection affects it)
Highly agree. I was once given FORTRAN course materials and an
assignment to teach this course. The first morning was spent on how to
construct expressions! No context as to what a program was or what it
might do or how to run it.

As soon as that class was over I rewrote the materials so the first
morning was how to write and run(batch job submission) a program that
read a record, did a simple calculation and wrote the results.

I certainly felt better about teaching this way.

Asides:

One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't".

Another wrote his first program. I took one look at it and saw the
mistakes. I explained how to walk thru the program step by step. He
exclaimed "In that much detail?".

Chris Angelico

unread,
Dec 11, 2013, 11:04:11 AM12/11/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 2:41 AM, rusi <rusto...@gmail.com> wrote:
> Yes its always like that:
> When you have to figure 2 (or 10) line programs its a no-brainer that
> the imperative style just works.
>
> When the ten becomes ten-thousand, written by a nut who's left you with
> code whose semantics is dependent on weird dependencies and combinatorial
> paths through the code you start wishing that
>
> - your only dependencies were data dependencies
> - "Explicit is better than implicit" dinned into the nut's head
>
> which BTW are the basic tenets of FP.

And since teaching is seldom done with 10KLOC codebases, functional
style can be left till later. I strongly believe that a career
programmer should learn as many languages and styles as possible, but
most of them can wait. Start with something easy, then pick up
something harder later.

ESR in "How to become a hacker" [1] suggests learning "Python, C/C++,
Java, Perl, and LISP" [2], and do take note of his reasons _why_. I'm
not sure that Perl is so important any more (though a Unix sysadmin
should probably have at least a working knowledge of it, given the
likelihood of tripping over it at some point), and for LISP you might
substitute some other functional language, but broadly, those five
recommendations haven't changed in years and years.

Knowing multiple styles lets you learn from all of them. Pure
functional programming means the result of any function can be
determined entirely from its arguments; that doesn't fit into
everything, but it sure does make your code easier to understand when
you (mostly) stick to it. (For instance, the current logging level
might change whether a particular line does something or does nothing,
but it still fundamentally has the same meaning, and it won't change
state magically anywhere else.) And there's a lot of "similarity of
thinking" between a well-written program in one style and a
well-written program in another style, regardless of which two styles
they are.

ChrisA

[1] http://www.catb.org/esr/faqs/hacker-howto.html
[2] http://www.catb.org/esr/faqs/hacker-howto.html#skills1

Mark Lawrence

unread,
Dec 11, 2013, 11:11:59 AM12/11/13
to pytho...@python.org
On 11/12/2013 16:01, bob gailer wrote:
>
> One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't".
>

Someone I worked with used x := x - x - x to invert a number.

Chris Angelico

unread,
Dec 11, 2013, 11:14:12 AM12/11/13
to comp.lang.python
On Thu, Dec 12, 2013 at 3:01 AM, bob gailer <bga...@gmail.com> wrote:
> One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't".

Yeah, which is why some languages (I first met it with Pascal) spell
that as "X *becomes* X + 1"... but regardless of what you call it,
there's a fundamental difference between algebra (where every line is
a statement of truth) and imperative programming (which may change
state as time progresses). What's called a "variable" in programming
really can vary; in maths, it's really just an "unknown". This is a
difference that, one way or another, just has to be taught.

> Another wrote his first program. I took one look at it and saw the mistakes.
> I explained how to walk thru the program step by step. He exclaimed "In that
> much detail?".

You mean a dry run [1]? Yes, can be tedious. Can also be very VERY
valuable, especially if done verbally to another programmer, as a
means of spotting differences between what the programmer thinks
something does and what the language thinks it does.

x = a * b + c

"Set x to a times the sum of b and c."

ChrisA

[1] http://foldoc.org/dry+run

Mark Lawrence

unread,
Dec 11, 2013, 11:18:08 AM12/11/13
to pytho...@python.org
On 11/12/2013 16:04, Chris Angelico wrote:
> I strongly believe that a career
> programmer should learn as many languages and styles as possible, but
> most of them can wait.

I chuckle every time I read this one. Five years per language, ten
languages, that's 50 years I think. Or do I rewrite my diary for next
week, so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia
Tuesday morning ...

Chris Angelico

unread,
Dec 11, 2013, 11:25:57 AM12/11/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 3:18 AM, Mark Lawrence <bream...@yahoo.co.uk> wrote:
> On 11/12/2013 16:04, Chris Angelico wrote:
>>
>> I strongly believe that a career
>> programmer should learn as many languages and styles as possible, but
>> most of them can wait.
>
>
> I chuckle every time I read this one. Five years per language, ten
> languages, that's 50 years I think. Or do I rewrite my diary for next week,
> so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia Tuesday
> morning ...

Well, I went exploring the Wikipedia list of languages [1] one day,
and found I had at least broad familiarity with about one in five. I'd
like to get that up to one in four, if only because four's a power of
two.

More seriously: Once you've learned five of very different styles, it
won't take you five years to learn a sixth language. I picked up Pike
in about a weekend by realizing that it was "Python semantics meets C
syntax", and then went on to spend the next few years getting to know
its own idioms. I'd say anyone who knows a dozen languages should be
able to pick up any non-esoteric language in a weekend, at least to a
level of broad familiarity of being able to read and comprehend code
and make moderate changes to it.

[1] https://en.wikipedia.org/wiki/List_of_programming_languages

ChrisA

rusi

unread,
Dec 11, 2013, 11:27:23 AM12/11/13
to
On Wednesday, December 11, 2013 9:31:42 PM UTC+5:30, bob gailer wrote:
> On 12/11/2013 3:43 AM, Chris Angelico wrote:
> > When you tell a story, it's important to engage the reader from the
> > start...explain "This is how to print Hello World to the
> > console" and worry about what exactly the console is (and how
> > redirection affects it)
> Highly agree. I was once given FORTRAN course materials and an
> assignment to teach this course. The first morning was spent on how to
> construct expressions! No context as to what a program was or what it
> might do or how to run it.

> As soon as that class was over I rewrote the materials so the first
> morning was how to write and run(batch job submission) a program that
> read a record, did a simple calculation and wrote the results.

Kernighan and Ritchie set an important "first" in our field by making
"Hello World" their first program.

People tend to under-estimate the importance of this:
Many assumptions need to be verified/truthified/dovetailed
starting from switching on the machine onwards for this to work.

And its quite a pleasurable sense of achievement when it finally holds
together -- something which is sorely missing in the Dijkstra approach.

However when we have an REPL language like python, one has the choice
of teaching the hello-world program as:

print ("Hello World")

or just

"Hello World"

The second needs one more assumption than the first, viz that we are in the
REPL, however on the whole it creates better habits in the kids.

[BTW: From the theoretical POV, imperative programming is 'unclean' because
of assignment statements. From the practical POV of a teacher, the
imperativeness of print is a bigger nuisance in students' thinking patterns
]

> I certainly felt better about teaching this way.

> Asides:

> One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't".

Yes thats one issue in most modern imperative languages that the older generation
(Pascal-family) did not have, viz that assignment looks like equality.

Steven D'Aprano

unread,
Dec 11, 2013, 11:36:04 AM12/11/13
to
On Wed, 11 Dec 2013 08:27:23 -0800, rusi wrote:

> [BTW: From the theoretical POV, imperative programming is 'unclean'
> because of assignment statements. From the practical POV of a teacher,
> the imperativeness of print is a bigger nuisance in students' thinking
> patterns ]

+1 on this

Trying to teach newbies to use return rather than print in their
functions is one of the more difficult parts of teaching beginners.


--
Steven

Chris Angelico

unread,
Dec 11, 2013, 11:45:51 AM12/11/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 3:27 AM, rusi <rusto...@gmail.com> wrote:
> However when we have an REPL language like python, one has the choice
> of teaching the hello-world program as:
>
> print ("Hello World")
>
> or just
>
> "Hello World"
>
> The second needs one more assumption than the first, viz that we are in the
> REPL, however on the whole it creates better habits in the kids.

How is the bare string creating better habits? The only time I've ever
been happy with bare strings having functionality[1] is in shell-like
languages (including REXX; the one time I built a REXX system in which
bare strings weren't executed as commands was a MUD, where command
handlers could use bare strings to send lines of text to the client,
and I wasn't happy with that - an explicit function would have been
better). I'd much rather teach a function that produces clean output
than depend on the REPL for Hello World. Now, depending on the REPL
for *expressions* is quite another thing.

>>> 1+2
3

That makes perfect sense! But it's using Python as a calculator, not
as a programming language. Python blurs the line a bit, but for
teaching programming, I'd use programming style even at the REPL:

>>> print("Hello, world!")
Hello, world!

ChrisA

[1] I don't have anything to footnote here, I just felt like having one.

Tim Delaney

unread,
Dec 11, 2013, 3:13:05 PM12/11/13
to Chris Angelico, pytho...@python.org
Absolutely. 10 years ago I was saying I'd forgotten at least 20 languages, and there have been many more since.

Once you know enough programming languages you (and by "you" I mean "me") get to the point where if you don't know a specific language you can pick up enough to be useful in a day or two, reasonably proficient in a week, and have a fairly high level of mastery by the time you've finished whatever project you picked it up for. And then you don't use it for a while, forget it to make room for something else, and pick it up again when you need it (much faster this time).

Except Prolog. Never could get my head around it - I should go back and have another try one of these days.

Some languages stick with you (e.g. Python) and I don't tend to learn languages that are too similar to what I already know unless it's for a specific project. So I've never learned Ruby ... but I have had to modify a few Ruby scripts along the way, and been able to achieve what I wanted the same day.

TimD elaney 

Ethan Furman

unread,
Dec 11, 2013, 3:47:28 PM12/11/13
to Python
On 12/11/2013 12:34 AM, Devin Jeanpierre wrote:
> On Tue, Dec 10, 2013 at 2:02 PM, Ethan Furman <et...@stoneleaf.us> wrote:
>> Doesn't sound like they do, as that's causing plenty of problems. In
>> today's world that level of knowledge isn't always necessary, especially if
>> your degree is not in CS. One of the (many) nice things about Python is one
>> doesn't need to know that stuff to Get Things Done.
>
> You don't need to know how to use the brakes to drive to Wal-Mart,
> either.

In my world, Getting Things Done includes not crashing at my destination. ;)

--
~Ethan~

Chris Angelico

unread,
Dec 11, 2013, 6:07:40 PM12/11/13
to Python
Reminds me of this discussion of reaching the moon:

http://htmlimg4.scribdassets.com/4uppo05fpc5w0c0/images/17-77601f4dfc.jpg

"We shall end up by arriving, I suppose."

ChrisA

Roy Smith

unread,
Dec 11, 2013, 8:42:32 PM12/11/13
to
In article <a34ada67-aa04-4f4d...@googlegroups.com>,
rusi <rusto...@gmail.com> wrote:

> Kernighan and Ritchie set an important "first" in our field by making
> "Hello World" their first program.

Yup.

> People tend to under-estimate the importance of this:
> Many assumptions need to be verified/truthified/dovetailed
> starting from switching on the machine onwards for this to work.

At the time that they wrote it, very few people who used computers ever
got anywhere near the power switch :-) But, the point is valid. To get
"Hello, world" to print, you've got to figure out a lot of stuff.
Predating the whole agile movement by two decades, it is the
quintessential MVP. It compiles and runs. The rest is just adding
features and fixing bugs.

Roy Smith

unread,
Dec 11, 2013, 8:50:53 PM12/11/13
to
In article <mailman.3913.1386778...@python.org>,
Mark Lawrence <bream...@yahoo.co.uk> wrote:

> On 11/12/2013 16:04, Chris Angelico wrote:
> > I strongly believe that a career
> > programmer should learn as many languages and styles as possible, but
> > most of them can wait.
>
> I chuckle every time I read this one. Five years per language, ten
> languages, that's 50 years I think. Or do I rewrite my diary for next
> week, so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia
> Tuesday morning ...

Not counting little side explorations, I have used in anger (and in
vaguely chronological order):

Basic
Fortran
C
Various assemblers (pdp-10, pdp-11, IBM-1130, M6800)
Common Lisp
Postscript
Python
TCL
Perl
Java
C++
Javascript

Larry Martell

unread,
Dec 11, 2013, 9:07:31 PM12/11/13
to pytho...@python.org
On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <r...@panix.com> wrote:
> In article <a34ada67-aa04-4f4d...@googlegroups.com>,
> rusi <rusto...@gmail.com> wrote:
>
>> Kernighan and Ritchie set an important "first" in our field by making
>> "Hello World" their first program.
>
> Yup.
>
>> People tend to under-estimate the importance of this:
>> Many assumptions need to be verified/truthified/dovetailed
>> starting from switching on the machine onwards for this to work.
>
> At the time that they wrote it, very few people who used computers ever
> got anywhere near the power switch :-)

Nope. Long before that I was working on computers that didn't boot
when you powered them up, You had to manually key in a bootstrap
program from the front panel switches. (And no, this is not a takeoff
of the Four Yorkshiremen sketch.)

Ben Finney

unread,
Dec 11, 2013, 9:21:38 PM12/11/13
to pytho...@python.org
Larry Martell <larry....@gmail.com> writes:

> On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <r...@panix.com> wrote:
> > rusi <rusto...@gmail.com> wrote:
> >
> >> Many assumptions need to be verified/truthified/dovetailed
> >> starting from switching on the machine onwards for this to work.
> >
> > At the time that [Kerningham & Ritchie] wrote [the C programming
> > language], very few people who used computers ever got anywhere near
> > the power switch :-)
>
> Nope. Long before that I was working on computers that didn't boot
> when you powered them up, You had to manually key in a bootstrap
> program from the front panel switches.

That's done by the *operator*, not the user. Most people who *used*
those computers worked at terminals at a distance, and usually separated
by a locked door, from the computer's power switch.

> (And no, this is not a takeoff of the Four Yorkshiremen sketch.)

The pendulum swings back and forth. Computer users are once again
blithely handing all their agency and choice back to centralised
operators (so-called “could computing”) who follow an agenda not of
those users's choosing.

Just as in the bad old days of 1960s centralised computing, complete
with computer operators who dismiss the needs of their users. And who
hold unquestionable authority to dictate how the computers may be used,
regardless what the users want to do. Only, now we get worldwide
unaccountable surveillance as part of the deal.

But you tell the users of today about that, and they don't believe you.

--
\ “If nature has made any one thing less susceptible than all |
`\ others of exclusive property, it is the action of the thinking |
_o__) power called an idea” —Thomas Jefferson |
Ben Finney

Roy Smith

unread,
Dec 11, 2013, 9:31:51 PM12/11/13
to
In article <mailman.3950.1386814...@python.org>,
Or put a boot card in the reader and hit the IPL button :-)

Mark Lawrence

unread,
Dec 11, 2013, 9:35:19 PM12/11/13
to pytho...@python.org
On 12/12/2013 02:21, Ben Finney wrote:

> Only, now we get worldwide unaccountable surveillance as part of the deal.
>

Whereas the 1920 UK Official Secrets Act required all international
cable companies operating on British terrority to submit copies of all
their traffic (both dispatched and received) within ten days of
transmission. Now there's accountability for you.

Ben Finney

unread,
Dec 11, 2013, 9:35:37 PM12/11/13
to pytho...@python.org
Ben Finney <ben+p...@benfinney.id.au> writes:

> Larry Martell <larry....@gmail.com> writes:
>
> > On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <r...@panix.com> wrote:
> > > rusi <rusto...@gmail.com> wrote:
> > >
> > >> Many assumptions need to be verified/truthified/dovetailed
> > >> starting from switching on the machine onwards for this to work.
> > >
> > > At the time that [Kerningham & Ritchie] wrote [the C programming
> > > language], very few people who used computers ever got anywhere near
> > > the power switch :-)
> >
> > Nope. Long before that I was working on computers that didn't boot
> > when you powered them up, You had to manually key in a bootstrap
> > program from the front panel switches.
>
> That's done by the *operator*, not the user. Most people who *used*
> those computers worked at terminals at a distance, and usually separated
> by a locked door, from the computer's power switch.
>
> > (And no, this is not a takeoff of the Four Yorkshiremen sketch.)
>
> The pendulum swings back and forth. Computer users are once again
> blithely handing all their agency and choice back to centralised
> operators (so-called “could computing”) who follow an agenda not of
> those users's choosing.

Hmm, interesting Freudian slip there. I meant “cloud computing”, of
course. That's where the computer owner pretends their service is always
available and easy to access, while having terms of service that give
them unilateral power to kick you off with no warning, no explanation,
no accountability, and no recourse.

--
\ “All television is educational television. The question is: |
`\ what is it teaching?” —Nicholas Johnson |
_o__) |
Ben Finney

rusi

unread,
Dec 11, 2013, 10:52:02 PM12/11/13
to
On Thursday, December 12, 2013 7:12:32 AM UTC+5:30, Roy Smith wrote:
> rusi wrote:

> > Kernighan and Ritchie set an important "first" in our field by making
> > "Hello World" their first program.

> Yup.

> > People tend to under-estimate the importance of this:
> > Many assumptions need to be verified/truthified/dovetailed
> > starting from switching on the machine onwards for this to work.

> At the time that they wrote it, very few people who used computers ever
> got anywhere near the power switch :-) But, the point is valid. To get
> "Hello, world" to print, you've got to figure out a lot of stuff.
> Predating the whole agile movement by two decades, it is the
> quintessential MVP. It compiles and runs. The rest is just adding
> features and fixing bugs.

Which comes back full-circle to where we started: if

main() { printf("Hello World\n"); }

is the foundation on which other programs are built, then later excising
the print(f) is a significant headache -- at least for teachers as Steven
also seems to have found.

If instead the print was presented more as a 'debug' -- when something
goes wrong stick a probe in there and figure the problem -- then
leaving it there would be as unacceptable as a car mechanic giving you
your keys with the hood open and parts lying around.

Anecdote about the great mathematician Gauss: He was asked why
his writings were so devoid of motivations/explanations. He answered:
Do you leave the scaffolding after the building is built?

Chris Angelico

unread,
Dec 11, 2013, 11:20:47 PM12/11/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 2:52 PM, rusi <rusto...@gmail.com> wrote:
> Which comes back full-circle to where we started: if
>
> main() { printf("Hello World\n"); }
>
> is the foundation on which other programs are built, then later excising
> the print(f) is a significant headache -- at least for teachers as Steven
> also seems to have found.
>
> If instead the print was presented more as a 'debug' -- when something
> goes wrong stick a probe in there and figure the problem -- then
> leaving it there would be as unacceptable as a car mechanic giving you
> your keys with the hood open and parts lying around.

Console output isn't just a debug feature, though - and if you're
using it as such, you possibly should be using the logging module
instead. It's the most fundamental form of output. It plays nicely
with shell redirection and long pipelines, which means it
automatically lets you work with something larger than memory or even
disk. Imagine starting a pipeline with a decompression step (eg gzip
-d), and ending it with a tight filter (eg grep) - everything in
between could manipulate any amount of data at all, without caring
about storage space. Console output works in the REPL, works in the
default interpreter (other than pythonw.exe which suppresses it),
works across SSH... if your most normal form of output is a GUI,
that's not always true. Console output works without requiring any
other program, too, unlike (for instance) a CGI script, which needs a
web browser to interpret its output. There's a reason many languages
bless it with a keyword.

ChrisA

alex23

unread,
Dec 12, 2013, 12:38:08 AM12/12/13
to
On 11/12/2013 8:45 PM, Chris Angelico wrote:
> A round of applause for jmf, folks,
> for doing a brilliant impression of the uninformed-yet-fanatical
> Knight Templar villain!

Jacques de Molay, thou are avenged!

wxjm...@gmail.com

unread,
Dec 12, 2013, 4:17:27 AM12/12/13
to
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 <ros...@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, <wxjm...@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. 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.

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

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


Chris Angelico

unread,
Dec 12, 2013, 5:28:35 AM12/12/13
to pytho...@python.org
On Thu, Dec 12, 2013 at 8:17 PM, <wxjm...@gmail.com> 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.

ChrisA

Steven D'Aprano

unread,
Dec 12, 2013, 5:59:58 AM12/12/13
to
On Thu, 12 Dec 2013 13:35:37 +1100, Ben Finney wrote:

> Hmm, interesting Freudian slip there. I meant “cloud computing”, of
> course. That's where the computer owner pretends their service is always
> available and easy to access, while having terms of service that give
> them unilateral power to kick you off with no warning, no explanation,
> no accountability, and no recourse.

Now Ben, you know that's not true. Everybody has the only recourse that
matters: buy the company and make them do what you want them to do. How
hard could that possibly be?



--
Steven

Ned Batchelder

unread,
Dec 12, 2013, 8:52:21 AM12/12/13
to pytho...@python.org
On 12/12/13 4:17 AM, wxjm...@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 <ros...@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, <wxjm...@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

Mark Lawrence

unread,
Dec 12, 2013, 9:30:24 AM12/12/13
to pytho...@python.org
On 12/12/2013 13:52, Ned Batchelder wrote:
>
> I'd be glad to have an extended conversation with you offline if you
> don't want to get into details here.

Would you please to kind enough to keep it online, I enjoy a good
comedian and our erstwhile unicode expert is one of the best, if not the
best, in this field.

If you do take it offline would you please ask him to stop sending via
google groups, or to take appropriate action to stop the extremely
annoying double spacing.

> 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.
>

There's also http://bugs.python.org/issue14170 and
http://bugs.python.org/issue15809 amongst others. Contributing towards
a solution is a simple thing to do. Finding a solution isn't as simple
see e.g. http://www.gossamer-threads.com/lists/python/dev/731701

wxjm...@gmail.com

unread,
Dec 12, 2013, 9:34:40 AM12/12/13
to
>>> 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

Chris Angelico

unread,
Dec 12, 2013, 9:47:40 AM12/12/13
to pytho...@python.org
On Fri, Dec 13, 2013 at 1:34 AM, <wxjm...@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, <wxjm...@gmail.com> 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.

ChrisA

Mark Lawrence

unread,
Dec 12, 2013, 10:01:39 AM12/12/13
to pytho...@python.org
On 12/12/2013 14:34, wxjm...@gmail.com wrote:
> Le jeudi 12 d�cembre 2013 11:28:35 UTC+1, Chris Angelico a �crit :
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.

wxjm...@gmail.com

unread,
Dec 12, 2013, 11:20:45 AM12/12/13
to
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, ...

Python (2) is managing all this very well. Unfortunately, not in
a friendly way.

jmf

bob gailer

unread,
Dec 12, 2013, 11:51:28 AM12/12/13
to Larry Martell, pytho...@python.org
On 12/11/2013 9:07 PM, Larry Martell wrote:

> Nope. Long before that I was working on computers that didn't boot
> when you powered them up, You had to manually key in a bootstrap
> program from the front panel switches.
PDP8? RIM loader, BIN loader?

Ned Batchelder

unread,
Dec 12, 2013, 11:58:06 AM12/12/13
to pytho...@python.org
On 12/12/13 11:20 AM, wxjm...@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, <wxjm...@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, <wxjm...@gmail.com> 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
>


Terry Reedy

unread,
Dec 12, 2013, 12:55:15 PM12/12/13
to pytho...@python.org
On 12/12/2013 4:17 AM, wxjm...@gmail.com wrote:

> 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.

Some disappear if, for instance, one uses Idle.

> I am the first to recognize the win console is all but
> friendly.

Something we agree on. It is a piece crap. I believe that MS keeps it
crippled to discourage use. (They apparently would like to remove it.)

> If one wishes to use a unicode code page, Python fails [*].

If you mean cp65xxx (I forget exact numbers), MS Command Prompt fails,
not Python. One should not use any other code page, but only other code
pages work.

Tk, and hence tkinter and idle work fine with the entire BMP. If one
tells tk to use a font that can handle the entire BMP, it displays the
entire BMP.

> 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!

Most text display problems disappear if one avoids Command Prompt and
uses a GUI that can handle at least the BMP. Idle works on Windows after
Python is installed unless one tells the installer to not install tcl/tk.

--
Terry Jan Reedy

Wolfgang Keller

unread,
Dec 12, 2013, 3:36:02 PM12/12/13
to
> I'm particularly interested to know if anyone can share experience of
> switching to teaching Python as a first programming language in a
> similar context. A written up case study that I could circulate among
> the relevant staff would be especially useful.

Just one experience from the "other" (student's) side.

When I started to study engineering science in 1991, Pascal was the
"first language" at the university in question (there were no
programming classes at highschool over here at that time yet). The class
was quite motivating and taught me some essential basics, I think.
Although issues such as object-orientation or event-based (GUI)
programming were not even mentioned, which is something that I'm
desperately missing today.

When I went to a different university (in 1993), still in engineering
science, they used C as the "first language" in the class there. The
result was that I tried (and succeeded) to pass that class with the
strict minimum of effort possible and deliberately forgot everything
that I had to learn about C as quickly as possible afterwards. I was a
"very good" student back then otherwise, so this was not due to
general laziness. What that class has taught me, essentially, was to
*hate* C. And it was not an issue of bad teachers. And they didn't mean
to make me hate C, after all, it was them who had chosen that language.
I never ever used C for anything (outside of that class). And ever
after that experience, I avoided all languages that were even remotely
similar to C, such as C++, Java, C#, Javascript, PHP etc.

In numerics classes and for research projects, I had to learn and use
Fortran, which was easy after the introduction with Pascal. The
teachers who taught me Fortran easily were the same as those who made me
hate C.

Then, I accidentally got in touch with Python (in 1994 iirc) and
thought it was interesting and useful. In fact Python is the only
programming language that I ever learned without being obliged to do
so. And the only one that I keep using whenever I have the choice.

Since then, the university that once used C as a "first language"
has switched to Python. Which is a good thing, imho. If I had had to
learn the basics of programming with C instead of Pascal, I most
certainly would have avoided anything even remotely connected to
programming ever since, even "office automation" through scripting
(which is what I use Python for today).

Sincerely,

Wolfgang

Chris Angelico

unread,
Dec 12, 2013, 4:12:46 PM12/12/13
to pytho...@python.org
On Fri, Dec 13, 2013 at 7:36 AM, Wolfgang Keller <feli...@gmx.net> wrote:
> And ever
> after that experience, I avoided all languages that were even remotely
> similar to C, such as C++, Java, C#, Javascript, PHP etc.

I think that's disappointing, for two reasons. Firstly, C syntax isn't
that terrible. You might prefer Python syntax to it, but it's
undeniably better than several of its predecessors (I do not want to
write in COBOL, tyvm!), and there are recent languages that manage to
get some things so crazily backward (like abolishing operator
precedence so 2 + 3 * 4 = 24 not 14) that I wouldn't want to use them.
And secondly, C is very much the language of Unix. Sure, its best job
is implementing high level languages so day-to-day code doesn't need
to use it, but it's still important when you need to get to some
lower-level facilities. For those two reasons, I think a basic working
knowledge of C is useful for working with computers, networking,
pretty much everything these days. It won't break your brain to
understand multiple styles, and it might help you to remember why it
is you love Python syntax so much :)

Last time I had to do some C work, I was reminded just how amazingly
convenient a high-level string class is... all I wanted to do was
concatenate a bunch of strings with spaces between them, and I had to
go through so many hoops!

" ".join(list_of_strings)

Et voila.

ChrisA

Larry Martell

unread,
Dec 12, 2013, 4:18:22 PM12/12/13
to bob gailer, pytho...@python.org
Data General Nova 3

Rhodri James

unread,
Dec 12, 2013, 6:50:45 PM12/12/13
to
On Wed, 11 Dec 2013 16:18:08 -0000, Mark Lawrence
<bream...@yahoo.co.uk> wrote:

> On 11/12/2013 16:04, Chris Angelico wrote:
>> I strongly believe that a career
>> programmer should learn as many languages and styles as possible, but
>> most of them can wait.
>
> I chuckle every time I read this one. Five years per language, ten
> languages, that's 50 years I think. Or do I rewrite my diary for next
> week, so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia
> Tuesday morning ...

Welcome to Computer Science lectures :-)

--
Rhodri James *-* Wildebeest Herder to the Masses

wxjm...@gmail.com

unread,
Dec 13, 2013, 11:15:42 AM12/13/13
to
Le jeudi 12 décembre 2013 18:55:15 UTC+1, Terry Reedy a écrit :
>
>
>
>
>
> If you mean cp65xxx (I forget exact numbers), MS Command Prompt fails,
>
> not Python. One should not use any other code page, but only other code
>
> pages work.
>
>
>

-----

Please, do not exaggerate too much.
On my win7 box, using cp65001:

The golang works. Despite my poor knowledge with with
this language, I even relatively quickly succeded to write
a "readline" fct.

Ruby 2 works.

irb, the interactive ruby works. I remember to have had
some diffuculties in entering some chars, this a different
problem.

echo "unicode" works.

xelatex (my favourite tool), a tex-unicode engine, works.
I'm usualy using a GUI tool, I just tested with a "éàü.tex"
document. Indeed, it works.

Starting that created document "éàü.pdf" with the cmd
> start éàü.pdf
works. It calls Acrobat Reader.

Starting that created document with Sumatra, a pdf viewer
works.

Not directly related to my comment, I can compile a
.tex document in such a dir
> D:\jm\Москва\Zürich\Αθήνα\œdipe
and it works.

Something a little bit different. Neil Hodgson's SciTE
editor. One can configure the output pane to use 65001.
All the examples above works. It is also possible to
make Python working, but I had to write my own "printing
material".

A note about font. The console does not, and is not able,
to display all the "chars". It is however always displaying
text very smoothly and correctly using the replacement *glyph".
Nothing to do with an "incorrect behaviour" of the console.

Eg:
> echo "ሴé€㑖Ѓ⌴*"
works.

I mainly considered BMP "characters".

Windows is not so bad. One can discuss ad nauseam
the pros and cons of console-gui application. I have
always considered Windows as a system which use gui
applications. And even with Python using a gui toolkit,
I sometimes "link" my own created "gui console".

I do not wish to defend MS. What I wrote depends
on the Windows version, XP, Vista, Windows 7.
One should recognize, with win7, MS, finally, produce
a full unicode system. Strangely, among all the "bashing"
one can read about that system, this is rarely mentioned.
(With an excellent unicode coding scheme!)

jmf



Frank Miles

unread,
Dec 13, 2013, 11:21:16 AM12/13/13
to
IIRC - wasn't that a machine that didn't even have 'subtract' - you had
to complement and add (2 steps) ?

Chris Angelico

unread,
Dec 13, 2013, 11:27:35 AM12/13/13
to pytho...@python.org
On Sat, Dec 14, 2013 at 3:15 AM, <wxjm...@gmail.com> wrote:
> One should recognize, with win7, MS, finally, produce
> a full unicode system. Strangely, among all the "bashing"
> one can read about that system, this is rarely mentioned.
> (With an excellent unicode coding scheme!)

[citation needed]

ChrisA

Mark Lawrence

unread,
Dec 13, 2013, 11:39:35 AM12/13/13
to pytho...@python.org
On 13/12/2013 16:27, Chris Angelico wrote:
> On Sat, Dec 14, 2013 at 3:15 AM, <wxjm...@gmail.com> wrote:
>> One should recognize, with win7, MS, finally, produce
>> a full unicode system. Strangely, among all the "bashing"
>> one can read about that system, this is rarely mentioned.
>> (With an excellent unicode coding scheme!)
>
> [citation needed]
>
> ChrisA
>

You'll have to wait until the cows come home on two counts. One, he's
never yet provided any evidence to support any statement that he's ever
made here. Second, he's still not smart enough to stop sending double
spaced google crap.

Chris Angelico

unread,
Dec 13, 2013, 11:43:11 AM12/13/13
to pytho...@python.org
On Sat, Dec 14, 2013 at 3:39 AM, Mark Lawrence <bream...@yahoo.co.uk> wrote:
> On 13/12/2013 16:27, Chris Angelico wrote:
>>
>> On Sat, Dec 14, 2013 at 3:15 AM, <wxjm...@gmail.com> wrote:
>>>
>>> One should recognize, with win7, MS, finally, produce
>>> a full unicode system. Strangely, among all the "bashing"
>>> one can read about that system, this is rarely mentioned.
>>> (With an excellent unicode coding scheme!)
>>
>>
>> [citation needed]
>>
>> ChrisA
>>
>
> You'll have to wait until the cows come home on two counts. One, he's never
> yet provided any evidence to support any statement that he's ever made here.
> Second, he's still not smart enough to stop sending double spaced google
> crap.

I don't know that it's a matter of not being smart enough. It's just
as likely to be a deliberate choice, as that method of posting ensures
that the quality of the style matches the quality of the substance.

ChrisA

rusi

unread,
Dec 13, 2013, 11:54:07 AM12/13/13
to
On Friday, December 13, 2013 10:13:11 PM UTC+5:30, Chris Angelico wrote:
> On Sat, Dec 14, 2013 at 3:39 AM, Mark Lawrence wrote:
> > You'll have to wait until the cows come home on two counts. One, he's never
> > yet provided any evidence to support any statement that he's ever made here.
> > Second, he's still not smart enough to stop sending double spaced google
> > crap.

> I don't know that it's a matter of not being smart enough. It's just
> as likely to be a deliberate choice, as that method of posting ensures
> that the quality of the style matches the quality of the substance.

Correlates? Ok
Ensures?? Citation needed

Mark Lawrence

unread,
Dec 13, 2013, 12:02:29 PM12/13/13
to pytho...@python.org
On 13/12/2013 16:43, Chris Angelico wrote:
> On Sat, Dec 14, 2013 at 3:39 AM, Mark Lawrence <bream...@yahoo.co.uk> wrote:
>> On 13/12/2013 16:27, Chris Angelico wrote:
>>>
>>> On Sat, Dec 14, 2013 at 3:15 AM, <wxjm...@gmail.com> wrote:
>>>>
>>>> One should recognize, with win7, MS, finally, produce
>>>> a full unicode system. Strangely, among all the "bashing"
>>>> one can read about that system, this is rarely mentioned.
>>>> (With an excellent unicode coding scheme!)
>>>
>>>
>>> [citation needed]
>>>
>>> ChrisA
>>>
>>
>> You'll have to wait until the cows come home on two counts. One, he's never
>> yet provided any evidence to support any statement that he's ever made here.
>> Second, he's still not smart enough to stop sending double spaced google
>> crap.
>
> I don't know that it's a matter of not being smart enough. It's just
> as likely to be a deliberate choice, as that method of posting ensures
> that the quality of the style matches the quality of the substance.
>
> ChrisA
>

How can it be deliberate choice, that implies thought in the first
place, which is highly conspicious by its absence?

Chris Angelico

unread,
Dec 13, 2013, 11:57:07 AM12/13/13
to pytho...@python.org
On Sat, Dec 14, 2013 at 3:54 AM, rusi <rusto...@gmail.com> wrote:
>> I don't know that it's a matter of not being smart enough. It's just
>> as likely to be a deliberate choice, as that method of posting ensures
>> that the quality of the style matches the quality of the substance.
>
> Correlates? Ok
> Ensures?? Citation needed

For jmf's posts? Definitely ensures. Citation: python-list archives. :)

ChrisA

wxjm...@gmail.com

unread,
Dec 13, 2013, 1:27:41 PM12/13/13
to
-----

My guess is that you are referring to that
sentence "(With an excellent unicode coding scheme!)".
I do not need to cite anything. That's my opinion.

My comment was mainly oriented about cp65*** in the
context of a teaching programming language. I pointed
that some tools are working very well with that code
page.

jmf

Chris Angelico

unread,
Dec 13, 2013, 1:32:58 PM12/13/13
to pytho...@python.org
On Sat, Dec 14, 2013 at 5:27 AM, <wxjm...@gmail.com> wrote:
> My guess is that you are referring to that
> sentence "(With an excellent unicode coding scheme!)".
> I do not need to cite anything. That's my opinion.

Just as much to what's above it, where you state that MS has produced
"a full unicode system". Is that, too, just opinion, utterly unfounded
in fact, or can you provide a citation?

ChrisA

wxjm...@gmail.com

unread,
Dec 13, 2013, 2:30:49 PM12/13/13
to
I have not the knowledge to put a jugment on this.
I read many articles on the subject from people
who seems to have some skills on the subject.

From my own experience with my limited and empirical
computing experience, when I see the file system,
the rendering engine, the usage of OpenType fonts, ...
I tend to have to agree. I can also point that all
these aspects jump to my mind when I switched from
XP to 7. Some time ago, I even fall on an article
about the bootstraping mechanism (7 or 8 or future
version or RT ?) which uses natively ucs-2.

jmf


Terry Reedy

unread,
Dec 13, 2013, 5:49:32 PM12/13/13
to pytho...@python.org
On 12/13/2013 11:15 AM, wxjm...@gmail.com wrote:
> Le jeudi 12 décembre 2013 18:55:15 UTC+1, Terry Reedy a écrit :

>> If you mean cp65xxx (I forget exact numbers), MS Command Prompt fails,
>> not Python. One should not use any other code page, but only other code
>> pages work.

> Please, do not exaggerate too much.

I try not to, so in case I mis-remembered, I tried your experiment.

>> echo "ሴé€㑖Ѓ⌴*"
> works.

I cut the mixed alphabet input line and pasted into a *fresh* Command
Prompt window on my USA Win 7 machine with all updates.

C:\Users\Terry>echo "?‚????*"
"?‚????*"

About what I expected, except for é becoming ,. Now the test. Change the
code page and re-paste.
'''
C:\Users\Terry>chcp 65001
Active code page: 65001

C:\Users\Terry>echo "*"
The system cannot write to the specified device.
'''
This a major fail as all non-ascii chars are deleted when pasted (at
least visibly) and the echo does not echo. There is no Python involved
in this failure.

I am willing to believe that you might have gotten different behavior on
your French Win 7 machine. Windows is not an international OS, but
rather a collection of ghettoized national versions.

As I said before, Idle does work in this regard.

Python 3.4.0a4 (v3.4.0a4:e245b0d7209b, Oct 20 2013, 19:57:58) [MSC
v.1600 64 bit (AMD64)] on win32
>>> "ሴé€㑖Ѓ⌴*"
'ሴé€㑖Ѓ⌴*'

--
Terry Jan Reedy


Mark Lawrence

unread,
Dec 13, 2013, 6:10:01 PM12/13/13
to pytho...@python.org
On 13/12/2013 22:49, Terry Reedy wrote:
> On 12/13/2013 11:15 AM, wxjm...@gmail.com wrote:
>> Le jeudi 12 décembre 2013 18:55:15 UTC+1, Terry Reedy a écrit :
>
>>> If you mean cp65xxx (I forget exact numbers), MS Command Prompt fails,
>>> not Python. One should not use any other code page, but only other code
>>> pages work.
>
>> Please, do not exaggerate too much.
>
> I try not to, so in case I mis-remembered, I tried your experiment.
>
> >> echo "ሴé€㑖Ѓ⌴*"
> > works.
>
> I cut the mixed alphabet input line and pasted into a *fresh* Command
> Prompt window on my USA Win 7 machine with all updates.
>
> C:\Users\Terry>echo "?‚????*"
> "?‚????*"
>
> About what I expected, except for é becoming ,. Now the test. Change the
> code page and re-paste.
> '''
> C:\Users\Terry>chcp 65001
> Active code page: 65001
>
> C:\Users\Terry>echo "*"
> The system cannot write to the specified device.
> '''
> This a major fail as all non-ascii chars are deleted when pasted (at
> least visibly) and the echo does not echo. There is no Python involved
> in this failure.
>
> I am willing to believe that you might have gotten different behavior on
> your French Win 7 machine. Windows is not an international OS, but
> rather a collection of ghettoized national versions.
>
> As I said before, Idle does work in this regard.
>
> Python 3.4.0a4 (v3.4.0a4:e245b0d7209b, Oct 20 2013, 19:57:58) [MSC
> v.1600 64 bit (AMD64)] on win32
> >>> "ሴé€㑖Ѓ⌴*"
> 'ሴé€㑖Ѓ⌴*'
>

Seems like we're now in the later stages of the 15, three minute rounds.
The trainer won't throw in the towel, the referee won't stop the fight
and the boxer himself won't quit. Is jmf actually trying to get himself
killed?

Terry Reedy

unread,
Dec 13, 2013, 6:30:38 PM12/13/13
to pytho...@python.org
On 12/13/2013 11:27 AM, Chris Angelico wrote:
> On Sat, Dec 14, 2013 at 3:15 AM, <wxjm...@gmail.com> wrote:
>> One should recognize, with win7, MS, finally, produce
>> a full unicode system. Strangely, among all the "bashing"
>> one can read about that system, this is rarely mentioned.
>> (With an excellent unicode coding scheme!)
>
> [citation needed]

Chris, I hardly think Jim's last statement (which I presume is your
target) is egregious enough to start another junk subthread of 9 (now
10) posts. Certainly '[citation needed]' is a pretty senseless comment.
'Citation' to what, for what? It is well-known that Windows uses 2-byte
words for unicode coding. If you want a citation for that fact, find it
yourself.

What is not clear to me is whether Windows internally uses UCS-2, which
only codes BMP chars, and which would *not* be excellent, or UTF-16,
which covers all chars by using surrogates. I will guess the latter.
More to the point, even if MS uses a complete coding scheme internally
(UFT-16), it does not, as far as I know, make it fully available and
usable to *me*, as I showed in my response about code page 65001.

--
Terry Jan Reedy

Chris Angelico

unread,
Dec 13, 2013, 6:38:48 PM12/13/13
to pytho...@python.org
On Sat, Dec 14, 2013 at 10:30 AM, Terry Reedy <tjr...@udel.edu> wrote:
> Chris, I hardly think Jim's last statement (which I presume is your target)
> is egregious enough to start another junk subthread of 9 (now 10) posts.
> Certainly '[citation needed]' is a pretty senseless comment. 'Citation' to
> what, for what? It is well-known that Windows uses 2-byte words for unicode
> coding. If you want a citation for that fact, find it yourself.
>
> What is not clear to me is whether Windows internally uses UCS-2, which only
> codes BMP chars, and which would *not* be excellent, or UTF-16, which covers
> all chars by using surrogates. I will guess the latter. More to the point,
> even if MS uses a complete coding scheme internally (UFT-16), it does not,
> as far as I know, make it fully available and usable to *me*, as I showed in
> my response about code page 65001.

And what I'm more asking for is a clarification on how Win 7 is
different from the previous Windowses. I know a lot did change from XP
to 7 (I don't care which side of Vista the change happened, let's just
compare the popular Windows with the popular Windows here), but I
wasn't aware that anything to do with Unicode had changed there. Since
jmf made the assertion in words which implied that Microsoft had now
*and only now* produced such a system, I asked for a citation.

ChrisA

Ethan Furman

unread,
Dec 13, 2013, 6:17:36 PM12/13/13
to pytho...@python.org
On 12/13/2013 03:10 PM, Mark Lawrence wrote:
>
> Seems like we're now in the later stages of the 15, three minute rounds. The trainer won't throw in the towel, the
> referee won't stop the fight and the boxer himself won't quit. Is jmf actually trying to get himself killed?

His credibility with me has been long dead. :(

--
~Ethan~

Mark Lawrence

unread,
Dec 13, 2013, 6:58:14 PM12/13/13
to pytho...@python.org
With me it never lived, we've simply had to put up with his FUD for 16
months.
It is loading more messages.
0 new messages