San Francisco
Beyond the Basic Stuff with Python. Copyright © 2021 by Al Sweigart.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-13: 978-1-59327-966-0 (print)
ISBN-13: 978-1-59327-967-7 (ebook)
Publisher: William Pollock
Executive Editor: Barbara Yien
Production Editor: Maureen Forys, Happenstance Type-O-Rama
Developmental Editor: Frances Saux
Cover Design: Octopod Studios
Interior Design: Octopod Studios
Technical Reviewer: Kenneth Love
Copyeditor: Anne Marie Walker
Compositor: Happenstance Type-O-Rama
Proofreader: Rachel Monaghan
Indexer: Valerie Perry
For information on book distributors or translations, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1-415-863-9900; info@nostarch.com
www.nostarch.com
Library of Congress Cataloging-in-Publication Data
Names: Sweigart, Al, author.
Title: Beyond the basic stuff with python : best practices for writing clean code /
Al Sweigart.
Description: San Francisco, CA : No Starch Press, Inc., [2021] | Includes
index.
Identifiers: LCCN 2020034287 (print) | LCCN 2020034288 (ebook) | ISBN
9781593279660 (paperback) | ISBN 9781593279677 (ebook)
Subjects: LCSH: Python (Computer program language) | Computer programming.
Classification: LCC QA76.73.P98 S943 2021 (print) | LCC QA76.73.P98
(ebook) | DDC 005.13/3—dc23
LC record available at https://lccn.loc.gov/2020034287
LC ebook record available at https://lccn.loc.gov/2020034288
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
For my nephew Jack
Al Sweigart is a software developer and tech book author living in Seattle. Python is his favorite programming language, and he is the developer of several open source modules for it. His other books are freely available under a Creative Commons license on his website at https://www.inventwithpython.com/. His cat Zophie weighs 11 pounds.
Kenneth Love is a programmer, teacher, and conference organizer. He is a Django contributor and PSF Fellow, and currently works as a tech lead and software engineer for O’Reilly Media.
It’s misleading to have just my name on the cover. This book wouldn’t exist without the efforts of many people. I’d like to thank my publisher, Bill Pollock; and my editors, Frances Saux, Annie Choi, Meg Sneeringer, and Jan Cash. I’d like to also thank production editor Maureen Forys, copy editor Anne Marie Walker, and No Starch Press executive editor Barbara Yien. Thanks to Josh Ellingson for another great cover illustration. Thank you to my technical reviewer, Kenneth Love, and all the other great friends I’ve met in the Python community.