Book updated for Python 3.0

Posted by Swaroop C H on September 5, 2008 Filed under: books, byte-of-python, python, tech

After a gap of 3.5 years, I've finally updated the 'A Byte of Python' book.

The interesting news is that it is updated for the upcoming Python 3.0 language making it probably the first book to be released for Python 3.0.

The book is now a wiki too at which means you can contribute too!

The book and wiki are now under the Creative Commons Attribution-Share Alike 3.0 Unported license. The Non-Commercial clause present in the previous edition of the book has been removed. It was becoming a hurdle for translators as well as people who wanted to use the book for genuinely good activities, so I decided it to drop the clause.

Since it is a wiki, volunteers can directly create their translations on the wiki. This eliminates the need to learn DocBook XML and its tools which had become a hindrance for many translators, and I'm glad to see this already bearing fruit with Eirik Vågeskar starting off a Norwegian translation at

I will soon be making a printed version of the book available as I have had many requests for this.

So back to the main question: Why an update after nearly 4 years? Two reasons.

First, because of I dedicate this new release to the community for their spirit and enthusiasm over the years which have rubbed off on me and kept me working on the update of the book.

Second, Over the past few years, the readers' reactions have been simply splendid:

Neil (bigdealneil-at-yahoo-dot-com) said:

"(I) got an if else to work and I can follow your tutorial, which I have never been able to do no matter who wrote the thing! you're a genius Swaroop!"

Gao shuai (ejwjvh-at-126-dot-com) took the effort taken to write an email to me in English:

dear swaroop: I am a chinese student.My name is gao shuai,"gao"is my family name. Although your book is easy to understand,but my english is bad,so what I read is the chinese edition. I have made some programs now.It is interesting.I like it very much.

I emailed back and he replied:

Mr Swaroop: I am exciting to read your back. _(Editor's note: I think he means 'reply')_ Tt is the first time that I talk to foreigner though the internet. I saw that you have your own mail ab.I think You're a great man. Thanks for your back!(*^_^*) regards, gaoshuai

The interesting part is that this student somewhere in China was being benefited by this book and he "talked to a foreigner through the internet for the first time" and that person was me. It was truly humbling.

People are even putting ads for it, and I had no clue about it until I chanced upon it myself:

An ad for 'Byte of Python'!

If that wasn't enough, I found out that there are 8-9 university courses officially using the book, including Harvard and other institutions. And apparently even NASA is using the book in their Jet Propulsion Laboratory.

Users have suggested that it should replace the official tutorial but I really wouldn't go as far as that :)

Recently, I had sent a sneak peek for the book's group of readers and within a day, I had the first 10$ donation by Horst JENS. I remembered seeing that name somewhere, so I searched my emails and found this:

On Mar 4, 2007:

"Hello Swaroop, i teach a class of (3) Children how to program in Python. Just want to thank you because without your 'a byte of python' (that i read one year ago) i would maybe never have begun to code in python and consequently would never leaved my old job to become a Python teacher."

A person in Vienna, Austria changed his career from a sys-admin job which he didn't like, to teaching children about programming, a job he loves. Wow! Again, this is so humbling. I could have never imagined that a small book can make such a difference.

The point is that I'm grateful for all these people writing to me and sharing their delight and stories. The book is still alive and kicking thanks to all these people.

Happy programming!


Kushal Das says:

Thank you , was waiting for this for a long time :D

Ramjee says:

It is very nice to hear this Swaroop. I never read the book but will take a look at it. Yes, very humbling to read the responses.

I can say that I knew you personally.

Pramode C.E says:

Great work, Swaroop! Your's is the first book on Python which all my students read ... I am sure it will continue to help readers all over the world in the coming years!

zentux says:

WOW !!!
Congrats man ! nice job :)

“Byte of Python” Updated! says:

[...] out Swaroop’s blog entry regarding the update to get a feel of the impact which a free book can have - here is one incidence which Swaroop [...]

Swaroop says:

@everyone Thanks for all the encouragement :)

sreerenj says:

You are always welcome.Me too started my python study from your tutorial.

Pramod Biligiri says:

Wow! Awesome! Keep at it.

Manish says:

Hi Swaroop. Great job !
Congratulations and keep up the great work !

(chanced on your site from promode's)


tuxmaniac’s blog » Blog Archive » Why I write Free Software! says:

[...] got this answer from Pramode and Swaroop’s blog post. I also would like to take this opportunity to appreciate and congratulate the updates Swaroop has [...]

JD says:


This is amazing. I have only skimmed through your book and frankly, it's great to see that it is having amazing impact around the world. Makes me want to write a similar book (on different subject ofcourse) myself. Thank you for making the world a better place. :)

BTW, Could you give me an idea as to how long it took before you could publish this draft? How much time you have spent maintaining it?


A Byte of Python « Noetic Nought says:

[...] >>> Links, References: [1] A Byte of Python [2] Python - Notes — Swaroop CH [3] Book updated for Python 3000 — Swaroop CH « [...]

Swaroop says:

@JD Hehe, that's a very good question with no real answer except for "Really long" :) ... It really depends on how much creativity you can put into the text. Sometimes you just get into the flow quickly and many times you don't. I would say you could make something in two months if you put in the dedicated time.

jag says:

hi I’m electrical electronic engineer always impassioned by the programming world, I started seriously to learn how to program in python and guest what? yes yes yest you got it I started with byte of python, I hope to master it in 1 to 2 years along with xhtml and soon I’ll have a web page where I plan to mention your work is really easy to learn from this guide though I’m on page 37 I hope to finish your guide in 3 more days.

was a pleasure to find your guide and keep doing this good work, by the way do you recommend learning lisp after i master python, i ask you this because you have lot of programming experience.


Swaroop says:

@jag Hehe, hopefully it doesn't take 1-2 years and instead takes a lot lesser time :)

I still haven't learned Lisp myself, so I would leave it to your better judgement if you need to learn it or not :)

jag says:

I hope so and thanks for your reply.

TInku says:

Awesome Swaroop. After Renaissance 2005, I started learning python basics from your book only. Very happy to see all happenings.

carlo says:

As a seasoned Python developer I read everything published since version 1.5. I have been using your book for my Python teaching for a long time and it is the first reading I always suggest to people approaching this wonderful programming language. Thanks Swaroop for this renewed edition which I am looking forward to reading and, why not, translating it in italian.

devadutta says:

You are on ars technica!

shadaab says:

i want to study python ...but i don't know where is python tutorial ..plz help me ....preffered places 4 me is hydrabad & chennai


There's no comment box, but please do email me or tweet me your thoughts and criticisms, and I will publish the relevant ones here.