📜 ⬆️ ⬇️

The book "Simple Python. Modern programming style "

image Hi, Habrozhiteli! Finally, we published the book of Bill Lyubanovich:

This book is ideal for novice programmers, as well as for those who are just going to learn Python, but already have programming experience in other languages. It details the latest Python packages and libraries.

Stylistically, the publication resembles a manual with code interspersing, explaining in detail the various concepts of Python 3. Under the cover you will find extensive material from the very foundations of the language to relatively complex and narrow topics.
')
After reading this book, you not only make sure that Python is tasty, but also master the art of testing, debugging, reusing code, and learn how to use Python in various subject areas.

Introduction


This book will introduce you to the Python programming language. It is intended for novice programmers, but even if you have already written programs and just want to add Python to the list of languages ​​available to you, the edition “Simple Python. Modern programming style ”will help in this.

The book is a leisurely introduction that will gradually take you from the basics to many more in-depth topics. I used a mix of textbook and cookbook styles to take turns explaining new terms and ideas. Code written in Python is included even in the very first chapters.

Despite the fact that the book is aimed at novice readers, I have included topics that may seem complicated, such as NoSQL databases or message passing libraries. I chose them because they will help solve many problems better than standard tricks. You will download and install those external Python packages that will come in handy when the “built-in batteries” are not suitable for your application. Trying something new is fun.

I also included a few examples in the book of what is not needed, especially if you have already worked with other programming languages ​​and are trying to adapt their style to Python. I will not argue that the Python programming language is perfect - I’ll just show you what to avoid.

Short description


The first seven chapters explain the basics of the Python programming language; they need to be read in order. The following chapters show how the Python programming language is used in certain areas, such as the Internet, databases, networks, etc., and can be read in any order. The first three applications demonstrate the use of the Python programming language in art, business, and science. Next, you will learn how to install Python 3 if you do not have it. After that there are answers to the exercises located at the end of each chapter, and then several useful lists.

Chapter 1. Programs are like guidelines for knitting socks or frying potatoes. With the help of real programs written in the Python language, the syntax of the language, its capabilities and applications in the real world are demonstrated. When comparing, Python does not lose to other languages, but it is not perfect. An older version of Python (Python 2) gives way to a newer version (Python 3). If you have Python 2 installed, install Python 3 on your computer. Use the interactive interpreter to run the examples from this book yourself.

Chapter 2. This chapter shows the simplest data types used in the Python programming language: Boolean variables, integers, floating-point numbers, and text strings. You will also learn basic math and text operations.

Chapter 3. We look at the built-in data structures of a higher level: lists, tuples, dictionaries, and sets. You will use these data types as a Lego designer to create more complex structures. You will learn to walk through them with the help of iterators and list inclusions.

Chapter 4. Here you will weave data structures from previous chapters with code structures to perform comparison, selection, or repetition operations. You will learn how to package code into functions and handle errors with exceptions.

Chapter 5. This chapter shows you how to navigate to larger data structures: modules, packages, and programs. You will learn where you can place code and data, enter and output data, process various options and explore the standard Python library.

Chapter 6. If you have already been involved in object-oriented programming in other languages, Python will look simpler than them. Chapter 6 explains when to use objects and classes, and when it is better to use modules, lists, or dictionaries.

Chapter 7. Learn how to professionally manage data. This chapter is entirely devoted to textual and binary data, the use of Unicode characters, and I / O issues.

Chapter 8. Data needs to be placed somewhere. In this chapter, you will begin working with simple files, directories, and file systems. Next, learn how to manage simple file formats like CSV, JSON, and XML. You will also learn how to store and retrieve data from relational databases and from modern NoSQL data warehouses.

Chapter 9. The World Wide Web is devoted to a separate chapter, which deals with clients, servers, data extraction, APIs and frameworks. In Chapter 9, you will develop a real site using query parameters and templates.

Chapter 10. This chapter is devoted to system programming. Here you will learn how to manage programs, processes and threads, work with date and time, automate the execution of some system administration tasks.

Chapter 11. The topic of this chapter is networks, namely: services, protocols, and APIs. Examples include low-level sockets, messaging libraries and queuing systems, as well as deployment to cloud systems.

Chapter 12. This chapter provides tips for developers writing in the Python programming language. They concern installation, use of IDE, testing, debugging, logging, source control and documentation. Chapter 12 also helps you find and install useful third-party packages, package your code for reuse, and learn where to get more detailed information.

Appendix A. The first appendix discusses what people do with the help of the Python programming language in art: graphics, music, animation, and games.

Appendix B. Some features of the Python programming language can also be applied to business: data visualization (graphs, graphs and maps), security and regulation.

Appendix B. The Python programming language is widely used in scientific activities: mathematics and statistics, physics, biology, and medicine. The application demonstrates the capabilities of the NumPy, SciPy and Pandas tools.

Appendix G. If you have not installed Python 3 on your computer yet, in this application you will find information on how to do this, regardless of which operating system you have installed: Windows, Mac OS / X, Linux or Unix.

Appendix D. Here are answers to the exercises listed at the end of each chapter. Do not pry there until you try to solve the problems yourself.

Appendix E. This appendix contains reference data.

Python Versions


Programming languages ​​change over time - developers add new features to them, and also fix bugs. The examples of this book are written and tested for the Python 3.3 version. Version 3.4 was released at the same time as this book, and I will tell you about some of the innovations. If you want to know what and when was added to the Python programming language, visit the page . It provides technical information. It may seem difficult to understand if you are just starting to learn Python, but may be useful in the future if you need to write programs for computers that have other versions of Python installed.

about the author


Bill Lyubanovich has been programming in the Unix operating system since 1977, has been developing the GUI since 1981, databases since 1990, and has been working on web development since 1993.

In 1982, working on an Intran startup, he created MetaForm, one of the first commercially successful GUIs (pre-Mac or Windows) for use on one of the first graphic workstations. In 1990, he wrote a visual revenue management system for Northwest Airlines, which gave millions of dollars in revenue. In addition, Lyubanovich created a "showcase" of the company on the Internet and wrote for her the first test for analyzing marketing on the web. Later, in 1994, he co-founded Tela, an Internet provider, and in 1999 participated in the creation of Mad Scheme, an Internet company.

Subsequently, Bill Lyubanovich developed kernel services and distributed systems as part of a team working on a startup from Manhattan. Currently, the author of this book is engaged in the integration of OpenStack services in a supercomputer company.

Bill happily lives in Minnesota with his wonderful wife Mary, son Tom and daughter Karin, caring for cats Inga and Lucy and cat Chester.

More information about the book can be found on the publisher's website.
Table of contents
Excerpt

For Habrozhiteley a 25% discount on the coupon - Python .

Source: https://habr.com/ru/post/307838/


All Articles