Название: Quick Python 3 (Quick Programming) Автор: David Matuszek Издательство: CRC Press Год: 2023 Страниц: 129 Язык: английский Формат: pdf (true) Размер: 10.2 MB
Are you a programmer who wants to get started quickly in a new language? This book is for you. Are you a novice who wants to learn to program? This book is not for you. Are you a Python programmer who needs encyclopaedic information? This book is not for you. Like any mainstream language, Python has loops, if statements, assignment statements, functions, etc. I’ll show you what these look like in Python. I won’t waste your time telling you what they’re good for. Python has features you may not be familiar with--iterators, list comprehensions, maybe even dictionaries. I’ll spend more time on these. I’ll cover some of the library functions I found most immediately useful, and tell you where to find more. In short, this book will help you hit the ground running. Next week, you’ll be ready to buy that Python encyclopaedia.
Code has to be tested. It is unusual for any significant piece of code to run correctly the first time. One all-too-common approach is to try out the code as it is being written, conclude that everything is correct, and do nothing to preserve the tests. This does nothing to future-proof the code against more subtle errors, and makes it more difficult to modify the code as requirements change. A test framework is software that:
1. allows tests to be written in a simple, standardized form; and 2. allows the tests to be run with an absolute minimum of effort.
In the following sections we will discuss two frameworks, doctest and unittest.
Скачать Quick Python 3 (Quick Programming)
|