come back and find python 3

P

pipehappy

Hi, all

Just come back to use Python, but find something has changed in Python
3.
Like package name is no longer with capitalized char for each word in
the name;
convenient print is removed.

And I don't know why can someone inside explain
to me about this. I think old package name is better for read while
new is better
to code. And old print is good tool for new comers.

Any other notable change between this 2 version? Or is there links to
articles
about the changes not in a developer view but a user view?

Best
 
E

Emile van Sebille

On 2/26/2011 11:36 AM pipehappy said...
Hi, all

Just come back to use Python, but find something has changed in Python
3.
Like package name is no longer with capitalized char for each word in
the name;
convenient print is removed.

And I don't know why can someone inside explain
to me about this. I think old package name is better for read while
new is better
to code. And old print is good tool for new comers.

Any other notable change between this 2 version? Or is there links to
articles
about the changes not in a developer view but a user view?

Best
You may want to review http://wiki.python.org/moin/Python2orPython3
and http://docs.python.org/release/3.1.2/whatsnew/3.0.html

Emile
 
W

Westley Martínez

Hi, all

Just come back to use Python, but find something has changed in Python
3.
Like package name is no longer with capitalized char for each word in
the name;
convenient print is removed.

And I don't know why can someone inside explain
to me about this. I think old package name is better for read while
new is better
to code. And old print is good tool for new comers.

Any other notable change between this 2 version? Or is there links to
articles
about the changes not in a developer view but a user view?

Best
I'm assuming you've been gone a long time. For all the changes:
http://docs.python.org/py3k/whatsnew/index.html

Basically the reason why package names are all lowercase is to avoid
confusion on case-insensitive platforms like Windows. The print
statement is now a built-in function.
 
T

Terry Reedy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top