473,797 Members | 3,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linux.com: Python 3 makes a big break

http://www.linux.com/feature/150399
Interesting article with one minor incompleteness.
"For instance, the print statement got turned into a print function; you
must now put parentheses around what you want to print to the screen.
The change allows developers to work with print in a more flexible and
uniform way. If someone needs to replace the print function with some
other action, it can be done with a universal search and replace, rather
than rewriting each print statement by hand."

Even easier, print as a function can be replaced simply by defining a
new version with the same name. No search/replace is needed. And
reversion to the built-in only requires commenting out the replacement.

Oct 18 '08 #1
6 1554
In article <ma************ *************** ***********@pyt hon.org>,
Terry Reedy <tj*****@udel.e duwrote:
>
http://www.linux.com/feature/150399
Although I have no objections to the way I was quoted, the article didn't
include the points I wanted to make. Here's my original interview:

On Sat, Oct 04, 2008, jo******@comcas t.net wrote:
>
Terrific! Thanks for participating. I'll be sure to put a link in the
story to your book.
That would be great! Please use http://www.pythonfood.com/
Could you say approximately how much Python 2.3 or 2.4 code you have
in your current job? What is this code used for, broadly speaking?
The company I work for is http://www.pagedna.com/ -- it has been in
business for more than ten years and was started with Python 1.4. I've
been working there for more than four years. Our software is a web
application for taking orders and sending EPS/PDF files to printing
plants.

There's more than 200K lines of code, most of it Python. A lot of the
code resides in template files for generating web pages. (There's a
significant amount of JavaScript, much of which is generated by Python
code.) Although EPS/PDF generation is the heart of our application,
there are many ancillary features to meet our customer needs (such as
approval workflow, inventory management, and reporting).
What are your thoughts about eventually moving that code to 3.0? Would
this be a big job? At what point, if ever, would it be necessary?
It would be a huge job, made more difficult because many of our bits of
Python code reside in web templates. However, by the time we do the
conversion the tools for automatic conversion should be much improved.
Although both my boss (Tony Lownds) and I are active in the Python
community, we haven't even talked about 3.0 -- it's at least two or
three years away.
In your opinion, do you think it's a wise move to forgo backward
compatibility in Python 3.0, given both the user base and current
limitations of the language?
First of all, I think it overstates the case to talk about "forgoing
compatibility". The base Python language is still the same; the only
difference immediately apparent at the simple scripting level is that the
print command has changed to a function. Python 3.0 is more about
removing mistakes and warts, many of which people have been encouraged to
avoid for years.

In addition, it is the intention to gradually merge the 2.x and 3.x
series; Python 2.6 is already a major step in that direction.

All in all, I think Python 3.0 is the kind of necessary evolution that
software needs. It certainly isn't as big a change as going from DOS to
Windows or from Mac OS 9 to OS X.
What qualities about Python first attracted you to the language?
Actually, I was forced to learn Python. I was a Perl expert at the time,
and I saw no reason to learn yet another scripting language. Since then,
I have become enamored of Python's readability and how a typical
programmer's pseudocode is trivially translated into running Python.
Of what you read about Python 3.0, what features do you find most
intriguing?
The fact that it's getting done at all! For years, Python 3.0 was
referred to as Python 3000 -- the joke being that it would happen in the
year 3000 (meaning, never). Work only started seriously three years ago,
and I think that Python 3.0 has done an excellent job of balancing the
past and the future.
That's about it, though if you have any other thoughts about Python
3.0, I'd love to hear them as well.
That pretty much covers it, I think.
--
Aahz (aa**@pythoncra ft.com) <* http://www.pythoncraft.com/

import antigravity
Oct 18 '08 #2
In message <gd**********@p anix3.panix.com >, Aahz wrote:
(There's a significant amount of JavaScript, much of which is generated by
Python code.)
Been there, done that. Triple backslashes, anybody? :)

Oct 18 '08 #3
In message <ma************ *************** ***********@pyt hon.org>, Terry
Reedy wrote:
"For instance, the print statement got turned into a print function ... "
Except I never use print in scripts.
Oct 18 '08 #4
In article <gd**********@l ust.ihug.co.nz> ,
Lawrence D'Oliveiro <ld*@geek-central.gen.new _zealandwrote:
>In message <gd**********@p anix3.panix.com >, Aahz wrote:
>>
(There's a significant amount of JavaScript, much of which is generated by
Python code.)

Been there, done that. Triple backslashes, anybody? :)
Why would you need a triple-backslash? Ever used raw strings?
--
Aahz (aa**@pythoncra ft.com) <* http://www.pythoncraft.com/

import antigravity
Oct 18 '08 #5
In article <gd**********@l ust.ihug.co.nz> ,
Lawrence D'Oliveiro <ld*@geek-central.gen.new _zealandwrote:
>In message <ma************ *************** ***********@pyt hon.org>, Terry
Reedy wrote:
>>
"For instance, the print statement got turned into a print function ... "

Except I never use print in scripts.
"What, never?"
--
Aahz (aa**@pythoncra ft.com) <* http://www.pythoncraft.com/

import antigravity
Oct 18 '08 #6
In message <gd**********@p anix3.panix.com >, Aahz wrote:
In article <gd**********@l ust.ihug.co.nz> ,
Lawrence D'Oliveiro <ld*@geek-central.gen.new _zealandwrote:
>>In message <ma************ *************** ***********@pyt hon.org>, Terry
Reedy wrote:
>>>
"For instance, the print statement got turned into a print function ...
"

Except I never use print in scripts.

"What, never?"
No, never. Not even "hardly ever".
Oct 19 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3016
by: inquirydog | last post by:
Hello- I, the inquirydog, would like to solicit suggestions for a new web page I am making: I am creating a simple website that will translate concepts between windows os's, Linux, and the Java language with all of its related technologies. The website is at http://members.dslextreme.com/users/inquirydog, and is a mock-version of the Rosetta stone, which indicates concepts from each "platform"
699
34266
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
34
5099
by: Maboroshi | last post by:
Hello My question has to do with python and linux - I was interested in finding out what it would take to reimplement the Linux Kernel in python basically just taking the source code from linux and rewriting it in python Would this idea make sense to do - if so what would be the benefits of doing this and in what way would this not be a good idea Cheers
0
1650
by: David H | last post by:
Background. I'm running on WinXP w/ MS Services for Unix installed (to give rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm running RHEE with python2.3 version. The code below works fine for me in linux, but in WinXP the popen*() command "hangs". More specifically, I get an apparent python prompt (without the '>>> ', but whatever I type has no effect, and hitting return does a CR but not the additional LF, so I...
10
1737
by: stylecomputers | last post by:
Hey guys, I am absolutely new to Linux programming, with no w######s programming experience except a small amount of C++ console apps. Reasonably new to Linux, BSD etc, got good sound networking base of knowledge and dont have any problem working the command line etc. I want to learn a language that I can use in my networking duties that is most likely to be of use to me. I have a few choices I can think of being:
53
5359
by: noahmd | last post by:
Okay, once-upon-a-time I tried to start programming by learning C. At the time I was younger and didn't really understand all that C had to offer. I eventually moved over to Microsoft's Visual Basic. It was nice to be able to design a visual application with no effort (too bad I didn't really learn the ins and outs of programming) Long story short, I want to get back into programming, and Python looks like a good choice for me to...
852
28769
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
2
20855
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use some of the tools provided on the command-line. If you hate the command line tools, get over it since you’re bound to be using them at some point in your career. All commands in Linux ARE case sensitive so capital letters are different from lowercase...
8
1178
by: Jean-Paul Calderone | last post by:
On Sat, 18 Oct 2008 15:30:23 -0400, Terry Reedy <tjreedy@udel.eduwrote: Perhaps it also omitted the fact that nothing prevents you from defining a function to write things to stdout (or elsewhere) in Python 2.5, making the Python 3.x change largely a non-feature. ;) Jean-Paul
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.