-
Book Overview & Buying
-
Table Of Contents
Mastering Python 2E - Second Edition
By :
In this chapter, you will learn how to write Pythonic code, along with finding out about some of the common pitfalls of Python and how to work around them. The pitfalls range from passing a list or dictionary (which are mutable) as an argument to more advanced pitfalls, such as late-binding in closures. You will also see how to fix or work around circular imports in a clean way. Some of the techniques used in the examples in this chapter might seem a bit too advanced for such an early chapter. Do not worry, though, as the inner workings will be covered later on.
We will explore the following topics in this chapter:
pyflakes, flake8, and more)The definition of Pythonic code used in this chapter is based on commonly accepted coding guidelines and my subjective opinions. When working...