P. 1
Byte of Python v192

Byte of Python v192

|Views: 4|Likes:
Published by Abhinay Nakka

More info:

Published by: Abhinay Nakka on Feb 26, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less






  • Introduction
  • Who Reads 'A Byte of Python'?
  • License
  • Read Now
  • Buy the Book
  • Download
  • Translations
  • Chinese
  • Chinese Traditional
  • Italian
  • German
  • Norwegian (bokmål)
  • Indonesian
  • Polish
  • Catalan
  • Portuguese
  • Romanian
  • Brazilian Portuguese
  • French
  • Danish
  • Spanish
  • Arabic
  • Swedish
  • Russian and Ukranian
  • Turkish
  • Mongolian
  • Who This Book Is For
  • History Lesson
  • Status Of The Book
  • Official Website
  • Feedback
  • Something To Think About
  • Features of Python
  • Why not Perl?
  • Why not Ruby?
  • What Programmers Say
  • About Python 3.0
  • For Linux and BSD users
  • For Windows Users
  • For Mac OS X Users
  • Using The Interpreter Prompt
  • Choosing An Editor
  • Using A Source File
  • Getting Help
  • Literal Constants
  • Numbers
  • Strings
  • Variables
  • Identifier Naming
  • Data Types
  • Objects
  • Logical And Physical Lines
  • Indentation
  • Summary
  • Operators
  • Evaluation Order
  • Changing the Order Of Evaluation
  • Associativity
  • Expressions
  • The if statement
  • The while Statement
  • The for loop
  • The break Statement
  • The continue Statement
  • Function Parameters
  • Local Variables
  • Using The global Statement
  • Using nonlocal statement
  • Default Argument Values
  • Keyword Arguments
  • VarArgs parameters
  • Keyword- only Parameters
  • The return Statement
  • DocStrings
  • Annotations
  • Byte- compiled .pyc files
  • The from ...import ...statement
  • A module's _ _ name_ _
  • Making Your Own Modules
  • The dir function
  • Packages
  • List
  • Tuple
  • Dictionary
  • Sequences
  • Set
  • More About Strings
  • The Problem
  • The Solution
  • Second Version
  • Third Version
  • Fourth Version
  • More Refinements
  • The Software Development Process
  • The self
  • Classes
  • Object Methods
  • The _ _init_ _ method
  • Class And Object Variables
  • Inheritance
  • Input from user
  • Files
  • Pickle
  • Errors
  • Exceptions
  • Handling Exceptions
  • Raising Exceptions
  • Try ..Finally
  • The with statement
  • sys module
  • logging module
  • urllib and json modules
  • Module of the Week Series
  • Passing tuples around
  • Special Methods
  • Single Statement Blocks
  • Lambda Forms
  • List Comprehension
  • Receiving Tuples and Lists in Functions
  • exec and eval
  • The assert statement
  • The repr function
  • Example Code
  • Questions and Answers
  • Tips and Tricks
  • Discussion
  • News
  • Installing libraries
  • Graphical Software
  • Various Implementations
  • Free/ Libre and Open Source Software (FLOSS)
  • Colophon
  • About The Author





(bernd-dot-hengelein-at-gmail-dot-com) and Christoph Zwerschke (cito-at-online-dot-de)
have volunteered to translate the book to German.
Their translation is located at http:/


abop-german.berlios.de (http:/




Lutz Horn : I'm 32 years old and have a degree of Mathematics from University
of Heidelberg, Germany. Currently I'm working as a software engineer on a
publicly funded project to build a web portal for all things related to computer
science in Germany. The main language I use as a professional is Java, but I try to
do as much as possible with Python behind the scenes. Especially text analysis
and conversion is very easy with Python. I'm not very familiar with GUI toolkits,
since most of my programming is about web applications, where the user
interface is build using Java frameworks like Struts. Currently I try to make more
use of the functional programming features of Python and of generators. After
taking a short look into Ruby, I was very impressed with the use of blocks in this
language. Generally I like the dynamic nature of languages like Python and Ruby
since it allows me to do things not possible in more static languages like Java. I've
searched for some kind of introduction to programming, suitable to teach a
complete non-programmer. I've found the book 'How to Think Like a Computer
Scientist: Learning with Python', and 'Dive into Python'. The first is good for
beginners but to long to translate. The second is not suitable for beginners. I
think 'A Byte of Python' falls nicely between these, since it is not too long, written
to the point, and at the same time verbose enough to teach a newbie. Besides this,
I like the simple DocBook structure, which makes translating the text a
generation the output in various formats a charm.

Python en:Translations


Bernd Hengelein : Lutz and me are going to do the german translation together.
We just started with the intro and preface but we will keep you informed about
the progress we make. Ok, now some personal things about me. I am 34 years old
and playing with computers since the 1980's, when the "Commodore C64" ruled
the nurseries. After studying computer science I started working as a software
engineer. Currently I am working in the field of medical imaging for a major
german company. Although C++ is the main language I (have to) use for my daily
work, I am constantly looking for new things to learn. Last year I fell in love with
Python, which is a wonderful language, both for its possibilities and its beauty. I
read somewhere in the net about a guy who said that he likes python, because the
code looks so beautiful. In my opinion he's absolutly right. At the time I decided to
learn python, I noticed that there is very little good documentation in german
available. When I came across your book the spontaneous idea of a german
translation crossed my mind. Luckily, Lutz had the same idea and we can now
divide the work. I am looking forward to a good cooperation!

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->