Op werkdagen voor 23:00 besteld, morgen in huis Gratis verzending vanaf €20
, ,

Python - In a Nutshell

A Desktop Quick Reference

Specificaties
Paperback, 722 blz. | Engels
O'Reilly | 4e druk, 2023
ISBN13: 9781098113551
Rubricering
Hoofdrubriek : Computer en informatica
O'Reilly 4e druk, 2023 9781098113551
Onderdeel van serie in a Nutshell (O'Reilly)
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

Python was recently ranked as today's most popular programming language on the TIOBE index, thanks to its broad applicability to design and prototyping to testing, deployment, and maintenance. With this updated fourth edition, you'll learn how to get the most out of Python, whether you're a professional programmer or someone who needs this language to solve problems in a particular field.

Carefully curated by recognized experts in Python, this new edition focuses on version 3.10, bringing this seminal work on the Python language fully up to date on five version releases, including preview coverage of upcoming 3.11 features.

This handy guide will help you:
- Learn how Python represents data and program as objects
- Understand the value and uses of type annotations
- Examine which language features appeared in which recent versions
- Discover how to use modern Python idiomatically
- Learn ways to structure Python projects appropriately
- Understand how to debug Python code

Specificaties

ISBN13:9781098113551
Trefwoorden:Programmeren
Taal:Engels
Bindwijze:paperback
Aantal pagina's:722
Uitgever:O'Reilly
Druk:4
Verschijningsdatum:7-2-2023

Over Alex Martelli

Alex Martelli spent 8 years with IBM Research, then 13 at think3 inc., followed by 4 years as a consultant (mostly for AB Strakt in Göteborg, Sweden), and lately 12 years at Google (currently as tech lead of 1:many tech support for Google Cloud Platform). He has also taught programming languages, development methods, and numerical computing at Ferrara University and other venues. He's a Fellow of the Python Software Foundation, a winner of the Frank Willison Memorial Award for contributions to the Python community, and a top-page reputation hog on Stack Overflow. Books he's authored or co-authored include two editions of the Python Cookbook, three of Python in a Nutshell, and "Beautiful Teams." Dozens of his tech talks at conferences, and interviews with him, are available on YouTube. Alex's proudest achievement are the articles that appeared in Bridge World (January and February 2000), which were hailed as giant steps towards solving issues that had haunted contract bridge theoreticians for decades, and still get quoted in current bridge-theoretical literature, after all these years.

Andere boeken door Alex Martelli

Over Anna Ravenscroft

Anna Martelli Ravenscroft is an experienced speaker and trainer, with a background developing curricula for a wide range of topics, from church, to regional transit, to disaster preparedness; developing web applications for therapy, learning, and fitness; and writing and reviewing technical books, articles, and presentations. While not a professional programmer, She is a Python enthusiast, and an active member of the Open Source community: she's a PSF Fellow, and winner of the 2013 Frank Willison Memorial Award for contributions to the Python community. Anna co-authored the second edition of the Python Cookbook and the third edition of Python in a Nutshell. She lives in Silicon Valley with her husband Alex, two dogs, one cat, and eight chickens.

Andere boeken door Anna Ravenscroft

Over Steve Holden

Steve Holden Is CTO of a stress-management startup in the UK. He has taught many classes on TCP/IP, network security, database and programming topics, and was the author of "Python Web Programming", the O'Reilly School of Technology's "Certificate series in Python" and O'Reilly Media's "Intermediate Python" video series. Steve has spent time on both sides of the "academic divide", and was an early researcher into the integration of text, graphics and database while teaching system development topics at Manchester University. This research led him to form Desktop Connection Limited, the first UK reseller of Frame Technology's (now Adobe's) FrameMaker software. His customers included British Telecom, British Aerospace, British Gas, and Sun Microsystems. Born and raised in the UK, Steve has travelled throughout Europe and the USA on teaching assignments. He recently returned to the UK after 20 years in the USA and now lives in Hastings, where when not working or writing he enjoys looking for worthwhile beers, entertaining friends and family, and reading science fiction.

Andere boeken door Steve Holden

Inhoudsopgave

1. Introduction to Python
The Python Language
The Python Standard Library and Extension Modules
Python Implementations
CPython
PyPy
Choosing Between CPython, PyPy, And Other Implementations
Other Developments, Implementations, and Distributions
Licensing and Price Issues
Python Development and Versions
Python Resources
Documentation
Community
Installation
Installing Python from Binaries
macOS
Installing Python from Source Code
Microsoft Windows
Unix-Like Platforms
Installing PyPy

2. The Python Interpreter
The Python Program
Environment Variables
Command-Line Syntax and Options
Interactive Sessions
Python Development Environments
IDLE
Other Python IDEs
Free Text Editors with Python Support
Tools for Checking Python Programs
Running Python Programs
The PyPy Interpreter

3. The Python Language
Lexical Structure
Lines and Indentation
Character Sets
Tokens
Statements
Data Types
Numbers
Sequences
Sets
Dictionaries
None
Ellipsis (...)
Callables
Boolean Values
Variables and Other References
Variables
Assignment Statements
del Statements
Expressions and Operators
Comparison Chaining
Short-Circuiting Operators
The ternary operator
Numeric Operations
Numeric Conversions
Arithmetic Operations
Sequence Operations
Strings
Tuples
Lists
Set Operations
Set Membership
Set Methods
Dictionary Operations
Dictionary Membership
Dictionary Methods
Control Flow Statements
The if Statement
||3.10+|| The match statement
The while Statement
The for Statement
The break Statement
The continue Statement
The else Clause on Loop Statements
The pass Statement
The try and raise Statements
The with Statement
Functions
Defining Functions: the def Statement
Parameters
Mutable default parameter values
Argument collector parameters
Attributes of Function Objects
Function Annotations
The return Statement
Calling Functions
Namespaces
lambda expressions
Generators
Recursion

4. Object-Oriented Python
Classes and Instances
Python Classes
The class Statement
The Class Body
Descriptors
Instances
Attribute Reference Basics
Bound and Unbound Methods
Inheritance
The Built-in object Type
Class-Level Methods
Properties
__slots__
__getattribute__
Per-Instance Methods
Inheritance from Built-in Types
Special Methods
General-Purpose Special Methods
Special Methods for Containers
Abstract Base Classes
Special Methods for Numeric Objects
Decorators
Metaclasses
Alternatives to Custom Metaclasses for Simple Class Customization
How Python Determines a Class’s Metaclass
How a Metaclass Creates a Class
Data Classes
Enumerated types (Enums)

5. Exceptions
The try Statement
try/except
try/finally
The try/except/finally Statement
The with Statement and Context Managers
Generators and Exceptions
Exception Propagation
The raise Statement
Exception Objects
The Hierarchy of Standard Exceptions
Standard Exception Classes
Custom Exception Classes
Custom Exceptions and Multiple Inheritance
Other Exceptions Used in the Standard Library
Error-Checking Strategies
LBYL Versus EAFP
Handling Errors in Large Programs
Logging Errors
The assert Statement
The __debug__ Built-in Variable

6. Modules
Module Objects
The import Statement
The from Statement
Module Loading
Built-in Modules
Searching the Filesystem for a Module
The Main Program
Reloading Modules
Circular Imports
sys.modules Entries
Custom Importers
Packages
Special Attributes of Package Objects
Namespace Packages
Absolute Versus Relative Imports
Distribution Utilities (distutils) and setuptools
Python Wheels
Python Environments
Enter the Virtual Environment
What Is a Virtual Environment?
Creating and Deleting Virtual Environments
Working with Virtual Environments
Managing Dependency Requirements
Other environment management solutions
Best practices with virtualenvs

7. Core Built-ins and Standard Library Modules
Built-in Types
Built-in Functions
Dynamic Execution
Avoiding exec
Expressions
Compile and Code Objects
Never exec or eval Untrusted Code
The sys Module
The copy Module
The collections Module
ChainMap
Counter
OrderedDict
defaultdict
keydefaultdict
deque
The functools Module
The heapq Module
The Decorate-Sort-Undecorate Idiom
The argparse Module
The itertools Module

8. Strings and Things
Methods of String, Bytes and Bytearray Objects
The string Module
String Formatting
Values by expression evaluation
Values by argument lookup
Value Conversion
Value Formatting
Formatted String Literals
Legacy String Formatting with %
Format Specifier Syntax
Text Wrapping and Filling
The pprint Module
The reprlib Module
Unicode
The codecs Module
The unicodedata Module

9. Regular Expressions
Regular Expressions and the re Module
REs and bytes Versus str
Pattern-String Syntax
Common Regular Expression Idioms
Sets of Characters
Alternatives
Groups
Optional Flags
Match Versus Search
Anchoring at String Start and End
Regular Expression Objects
Match Objects
Functions of the re Module
REs and the := operator
The 3rd party regex module

10. Persistence and Databases
Serialization
The csv Module
The json Module
The pickle Module
The shelve Module
DBM Modules
The dbm Package
Examples of DBM-Like File Use
Berkeley DB Interfacing
The Python Database API (DBAPI) 2.0
Exception Classes
Thread Safety
Parameter Style
Factory Functions
Type Description Attributes
The connect Function
Connection Objects
Cursor Objects
DBAPI-Compliant Modules
SQLite
class sqlite3.Connection
class sqlite3.Row

11. Time Operations
The time Module
The datetime Module
The date Class
The time Class
The datetime Class
The timedelta Class
The dateutil Module
The sched Module
The calendar Module

12. Controlling Execution
Per-Site Customization
The site and sitecustomize Modules
Termination Functions
Dynamic Execution and exec
Avoiding exec
Expressions
Compile and Code Objects
Never exec or eval Untrusted Code
Internal Types
Type Objects
The Code Object Type
The frame Type
Garbage Collection
The gc Module
The weakref Module

13. Numeric Processing
Floating-point Values
The math and cmath Modules
The operator Module
Random and Pseudorandom Numbers
The random Module
Physically and Cryptographically Strong Random Numbers:the secrets module
The fractions Module
The decimal Module
Array Processing
The array Module
Extensions for Numeric Array Computation
NumPy
Creating a NumPy Array
Shape, Indexing, and Slicing
Matrix Operations in NumPy
SciPy
Additional Numeric Packages

14. Testing, Debugging, and Optimizing
Testing
Unit Testing and System Testing
The doctest Module
The unittest Module
Testing with pytest
Debugging
Before You Debug
The inspect Module
The traceback Module
The pdb Module
The warnings Module
Classes
Objects
Filters
Functions
Optimization
Developing a Fast-Enough Python Application
Benchmarking
Large-Scale Optimization
Profiling
Small-Scale Optimization

15. Networking Basics
The Berkeley Socket Interface
Socket Addresses
Client-Server Computing
The socket Module
Socket Objects
A Connectionless Socket Client
A Connectionless Socket Server
A Connection-Oriented Socket Client
A Connection-Oriented Socket Server
Transport Layer Security (TLS, AKA SSL)
SSLContext

16. Client-Side Network Protocol Modules
Email Protocols
The poplib Module
The smtplib Module
HTTP and URL Clients
URL Access
The Third-Party requests Package
The urllib Package
Other Network Protocols

17. Serving HTTP
http.server
WSGI
WSGI Servers
ASGI
Python Web Frameworks
“Full-Stack” Versus “Lightweight” Frameworks
A Few Popular Full-Stack Frameworks
Some Popular Lightweight Frameworks
Summary

18. Email, MIME, and Other Network Encodings
MIME and Email Format Handling
Functions in the email Package
The email.message Module
The email.Generator Module
Creating Messages
The email.encoders Module
The email.utils Module
Example Uses of the email Package
Encoding Binary Data as ASCII Text
The base64 Module
The quopri Module
The uu Module

19. Structured Text: HTML
The html.entities Module
The BeautifulSoup Third-Party Package
The BeautifulSoup Class
The Navigable Classes of bs4
bs4 find... Methods (“Search Methods”)
bs4 CSS Selectors
An HTML Parsing Example with BeautifulSoup
Generating HTML
Editing and Creating HTML with bs4
Building HTML with bs4
Templating
The jinja2 Package
The jinja2.Environment Class
The jinja2.Template Class

20. Structured Text: XML
ElementTree
The Element Class
The ElementTree Class
Functions in the ElementTree Module
Parsing XML with ElementTree.parse
Building an ElementTree from Scratch
Parsing XML Iteratively

About the Authors

Net verschenen

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Python - In a Nutshell