Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clean Code in Python, published by Packt

License

NotificationsYou must be signed in to change notification settings

PacktPublishing/Clean-Code-in-Python

Repository files navigation

Clean Code in Python

This is the code repository forClean Code in Python, published by Packt.

Refactor your legacy code base

What is this book about?

Python is currently used in many different areas such as software construction, systems administration, and data processing. In all of these areas, experienced professionals can find examples of inefficiency, problems, and other perils, as a result of bad code. After reading this book, readers will understand these problems, and more importantly, how to correct them.

This book covers the following exciting features:Set up tools to effectively work in a development environmentExplore how the magic methods of Python can help us write better codeExamine the traits of Python to create advanced object-oriented designUnderstand removal of duplicated code using decorators and descriptorsEffectively refactor code with the help of unit testsLearn to implement the SOLID principles in Python

If you feel this book is for you, get yourcopy today!

https://www.packtpub.com/

Instructions and Navigations

Setup

Create a virtual environment, and once activated run:

make setup

This will install the common dependencies. Besides this, each chapter mighthave additional ones, for which anothermake setup will have to be runinside that particular directory.

Each chapter has its corresponding directory given by its number.

Inside each chapter directory, tests can be run by:

make test

This requires themake application installed (in Unix environments).In environments without access to themake command, the same code can betested by running the commands on theMakefile:

python -m doctest *.pypython -m unittest *.py

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

class Point:    def __init__(self, lat, long):        self.lat = lat        self.long = long

Errata

  • In Chapter 2, page 41: Add the following import in the code:from datetime import date

Following is what you need for this book:This book will appeal to team leads, software architects and senior software engineers who would like to work on their legacy systems to save cost and improve efficiency. A strong understanding of Programming is assumed.

With the following software and hardware list you can run all code files present in the book (Chapter 1-10).

Software and Hardware List

ChapterSoftware requiredHardware required
1, 2, 3, 4, 5, 6, 7, 8, 9, 10Python 3.7System with 4GB RAM
10DockerSystem with 4GB RAM

Related products

Get to Know the Author

Mariano Anayais a software engineer who spends most of his time creating software with Python and mentoring fellow programmers. Mariano's main areas of interests besides Python are software architecture, functional programming, distributed systems, and speaking at conferences.

He was a speaker at Euro Python 2016 and 2017. To know more about him, you can refer to his GitHub account with the username rmariano.

His speakerdeck username is rmariano.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781788835831

About

Clean Code in Python, published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors11

Languages


[8]ページ先頭

©2009-2025 Movatter.jp