|
Book details / order |
LEARNING PYTHON, 5TH EDITION POWERFUL OBJECT-ORIENTED PROGRAMMING |
Get a comprehensive, in-depth introduction to the core python language with this hands-on book. based on author mark lutz’s popular training course, this updated fifth edition will help you quickly write efficient, high-quality code with python. it’s an ideal way to begin, whether you’re new to programming or a professional developer versed in other languages.
complete with quizzes, exercises, and helpful illustrations, this easy-to-follow, self-paced tutorial gets you started with both python 2.7 and 3.3— the latest releases in the 3.x and 2.x lines—plus all other releases in common use today. you’ll also learn some advanced language features that recently have become more common in python code.
explore python’s major built-in object types such as numbers, lists, and dictionaries
create and process objects with python statements, and learn python’s general syntax model
use functions to avoid code redundancy and package code for reuse
organize statements, functions, and other tools into larger components with modules
dive into classes: python’s object-oriented programming tool for structuring code
write large programs with python’s exception-handling model and development tools
learn advanced python tools, including decorators, descriptors, metaclasses, and unicode processing
about the author
mark lutz is a leading python trainer, the author of python’s earliest and best-selling texts, and a pioneering figure in the python world.
mark is the author of the three o’reilly books: learning python, programming python, and python pocket reference, all currently in fourth or fifth editions. he has been using and promoting python since 1992, started writing python books in 1995, and began teaching python classes in 1997. as of spring 2013, mark has instructed 260 python training sessions, taught roughly 4,000 students in live classes, and written python books that have sold 400,000 units and been translated to at least a dozen languages.
together, his two decades of python efforts have helped to establish it as one of the most widely used programming languages in the world today. in addition, mark has been in the software field for 30 years. he holds bs and ms degrees in computer science from the university of wisconsin where he explored implementations of the prolog language, and over his career has worked as a professional software developer on compilers, programming tools, scripting applications, and assorted client/server systems.
table of contents:
getting started
chapter 1 a python q&a;session
why do people use python?
is python a “scripting language”?
ok, but what’s the downside?
who uses python today?
what can i do with python?
how is python developed and supported?
what are python’s technical strengths?
how does python stack up to language x?
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 2 how python runs programs
introducing the python interpreter
program execution
execution model variations
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 3 how you run programs
the interactive prompt
system command lines and files
unix-style executable scripts: #!
clicking file icons
module imports and reloads
using exec to run module files
the idle user interface
other ides
other launch options
which option should i use?
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part i exercises
types and operations
chapter 4 introducing python object types
the python conceptual hierarchy
why use built-in types?
python’s core data types
numbers
strings
lists
dictionaries
tuples
files
other core types
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 5 numeric types
numeric type basics
numbers in action
other numeric types
numeric extensions
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 6 the dynamic typing interlude
the case of the missing declaration statements
shared references
dynamic typing is everywhere
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 7 string fundamentals
this chapter’s scope
string basics
string literals
strings in action
string methods
string formatting expressions
string formatting method calls
general type categories
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 8 lists and dictionaries
lists
lists in action
dictionaries
dictionaries in action
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 9 tuples, files, and everything else
tuples
files
core types review and summary
built-in type gotchas
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part ii exercises
statements and syntax
chapter 10 introducing python statements
the python conceptual hierarchy revisited
python’s statements
a tale of two ifs
a quick example: interactive loops
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 11 assignments, expressions, and prints
assignment statements
expression statements
print operations
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 12 if tests and syntax rules
if statements
python syntax revisited
truth values and boolean tests
the if/else ternary expression
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 13 while and for loops
while loops
break, continue, pass, and the loop else
for loops
loop coding techniques
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 14 iterations and comprehensions
iterations: a first look
list comprehensions: a first detailed look
other iteration contexts
new iterables in python 3.x
other iteration topics
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 15 the documentation interlude
python documentation sources
common coding gotchas
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part iii exercises
functions and generators
chapter 16 function basics
why use functions?
coding functions
a first example: definitions and calls
a second example: intersecting sequences
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 17 scopes
python scope basics
the global statement
scopes and nested functions
the nonlocal statement in 3.x
why nonlocal? state retention options
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 18 arguments
argument-passing basics
special argument-matching modes
the min wakeup call!
generalized set functions
emulating the python 3.x print function
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 19 advanced function topics
function design concepts
recursive functions
function objects: attributes and annotations
anonymous functions: lambda
functional programming tools
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 20 comprehensions and generations
list comprehensions and functional tools
generator functions and expressions
comprehension syntax summary
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 21 the benchmarking interlude
timing iteration alternatives
timing iterations and pythons with timeit
other benchmarking topics: pystones
function gotchas
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part iv exercises
modules and packages
chapter 22 modules: the big picture
why use modules?
python program architecture
how imports work
byte code files: __pycache__ in python 3.2+
the module search path
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 23 module coding basics
module creation
module usage
module namespaces
reloading modules
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 24 module packages
package import basics
package import example
why use package imports?
package relative imports
python 3.3 namespace packages
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 25 advanced module topics
module design concepts
data hiding in modules
enabling future language features: __future__
mixed usage modes: __name__ and __main__
example: dual mode code
changing the module search path
the as extension for import and from
example: modules are objects
importing modules by name string
example: transitive module reloads
module gotchas
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part v exercises
classes and oop
chapter 26 oop: the big picture
why use classes?
oop from 30,000 feet
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 27 class coding basics
classes generate multiple instance objects
classes are customized by inheritance
classes can intercept python operators
the world’s simplest python class
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 28 a more realistic example
step 1: making instances
step 2: adding behavior methods
step 3: operator overloading
step 4: customizing behavior by subclassing
step 5: customizing constructors, too
step 6: using introspection tools
step 7 (final): storing objects in a database
future directions
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 29 class coding details
the class statement
methods
inheritance
namespaces: the conclusion
documentation strings revisited
classes versus modules
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 30 operator overloading
the basics
indexing and slicing: __getitem__ and __setitem__
index iteration: __getitem__
iterable objects: __iter__ and __next__
membership: __contains__, __iter__, and __getitem__
attribute access: __getattr__ and __setattr__
string representation: __repr__ and __str__
right-side and in-place uses: __radd__ and __iadd__
call expressions: __call__
comparisons: __lt__, __gt__, and others
boolean tests: __bool__ and __len__
object destruction: __del__
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 31 designing with classes
python and oop
oop and inheritance: “is-a” relationships
oop and composition: “has-a” relationships
oop and delegation: “wrapper” proxy objects
pseudoprivate class attributes
methods are objects: bound or unbound
classes are objects: generic object factories
multiple inheritance: “mix-in” classes
other design-related topics
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 32 advanced class topics
extending built-in types
the “new style” class model
new-style class changes
new-style class extensions
static and class methods
decorators and metaclasses: part 1
the super built-in function: for better or worse?
class gotchas
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part vi exercises
exceptions and tools
chapter 33 exception basics
why use exceptions?
exceptions: the short story
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 34 exception coding details
the try/except/else statement
the try/finally statement
unified try/except/finally
the raise statement
the assert statement
with/as context managers
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 35 exception objects
exceptions: back to the future
why exception hierarchies?
built-in exception classes
custom print displays
custom data and behavior
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 36 designing with exceptions
nesting exception handlers
exception idioms
exception design tips and gotchas
core language summary
chapter summary
test your knowledge: quiz
test your knowledge: answers
test your knowledge: part vii exercises
advanced topics
chapter 37 unicode and byte strings
string changes in 3.x
string basics
coding basic strings
coding unicode strings
using 3.x bytes objects
using 3.x/2.6+ bytearray objects
using text and binary files
using unicode files
other string tool changes in 3.x
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 38 managed attributes
why manage attributes?
properties
descriptors
__getattr__ and __getattribute__
example: attribute validations
chapter summary
test your knowledge: quiz
chapter 39 decorators
what’s a decorator?
the basics
coding function decorators
coding class decorators
managing functions and classes directly
example: “private” and “public” attributes
example: validating function arguments
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 40 metaclasses
to metaclass or not to metaclass
the metaclass model
declaring metaclasses
coding metaclasses
inheritance and instance
metaclass methods
example: adding methods to classes
example: applying decorators to methods
chapter summary
test your knowledge: quiz
test your knowledge: answers
chapter 41 all good things
the python paradox
where to go from here
encore: print your own completion certificate!
appendixes
appendix installation and configuration
installing the python interpreter
configuring python
for more help
appendix the python 3.3 windows launcher
the unix legacy
the windows legacy
introducing the new windows launcher
a windows launcher tutorial
pitfalls of the new windows launcher
conclusions: a net win for windows
appendix python changes and this book
major 2.x/3.x differences
general remarks: 3.x changes
fifth edition python changes: 2.7, 3.2, 3.3
fourth edition python changes: 2.6, 3.0, 3.1
third edition python changes: 2.3, 2.4, 2.5
earlier and later python changes
appendix solutions to end-of-part exercises
part i, getting started
part ii, types and operations
part iii, statements and syntax
part iv, functions and generators
part v, modules and packages
part vi, classes and oop
part vii, exceptions and tools
Author : Mark lutz
Publication : Oreilly
Isbn : 9789351102014
Store book number : 105
NRS 2880.00
|
|
|
|
|
|
|
|
|
|