come back and find python 3

Terry Reedy tjreedy at udel.edu
Sat Feb 26 21:08:30 CET 2011


On 2/26/2011 2:36 PM, pipehappy wrote:

To answer your questions, as I understand them.

1. Print was not removed, just changed to a function:
a. gets rid of special-case hackish syntax like >> and trailing comma by 
using keyword args instead, becoming more flexible as a result;
b. function can be passed to other functions;
c. function can be redefined with 'def statement'

2. Modules get lowercase names; classes uppercase names:
avoids confusion between module and main class with 'same' name

import mod
from mod import Mod
... hundreads of lines later
mod # in some expression, I know that is the module
Mod # in some expression, I know that is the main class in mod

3. Other changes. Read What's new for 3.0, 3.1, 3.2.
The most important thing is that text is always unicode instead of bytes 
unless made unicode. This has caused some problems as well as solving 
many, but many have (hopefully) been ironed out in 3.2. Do start with 
3.2.0 rather than 3.1.3.

-- 
Terry Jan Reedy




More information about the Python-list mailing list