# Pythonic Programming: Tip 5 contradicts PEP 8

**URL:** <https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082>\
**Category:** PragProg Customers\
**Tags:** book-pythonic-programming, errata\
**Created:** [21 July 2021 13:40 UTC](https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082 "2021-07-21T13:40:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmreich](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@mmreich](https://forum.devtalk.com/u/mmreich)\
**Post date:** [21 July 2021 13:40 UTC](https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082/1 "2021-07-21T13:40:51Z")

</div>

@aqsaqal

Tip 5 contains the following text:

Use mixedCase identifiers for variables, functions, and modules.

From the Python Style Guide, [PEP 8 – Style Guide for Python Code | peps.python.org](https://www.python.org/dev/peps/pep-0008/#naming-conventions:)

**Package and Module Names**  
Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.

### [Function and Variable Names](https://www.python.org/dev/peps/pep-0008/#id45)

Function names should be lowercase, with words separated by underscores as necessary to improve readability.

Variable names follow the same convention as function names.

mixedCase is allowed only in contexts where that’s already the prevailing style (e.g. threading.py), to retain backwards compatibility.

---

<div class="post-metadata">

**Author:** ![aqsaqal](https://forum.devtalk.com/user_avatar/forum.devtalk.com/aqsaqal/32/1023_2.png) [@aqsaqal](https://forum.devtalk.com/u/aqsaqal)\
**Post date:** [21 July 2021 18:46 UTC](https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082/2 "2021-07-21T18:46:21Z")

</div>

A good catch, thanks!

---

<div class="post-metadata">

**Author:** ![onyx-and-iris](https://forum.devtalk.com/user_avatar/forum.devtalk.com/onyx-and-iris/32/5284_2.png) [@onyx-and-iris](https://forum.devtalk.com/u/onyx-and-iris)\
**Post date:** [30 January 2024 01:55 UTC](https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082/3 "2024-01-30T01:55:20Z")

</div>

I came here exactly to ask about this. I just started reading this book and I’m reading that I should use mixedCase?

Even threading module has now introduced snake cased methods.

> **[threading — Thread-based parallelism](https://docs.python.org/3/library/threading.html)**
>
> Source code: Lib/threading.py This module constructs higher-level threading interfaces on top of the lower level\_thread module. CPython implementation detail: In CPython, due to the Global Interpre...

---

<div class="post-metadata">

**Author:** ![Margaret](https://forum.devtalk.com/user_avatar/forum.devtalk.com/margaret/32/237_2.png) [@Margaret](https://forum.devtalk.com/u/Margaret)\
**Post date:** [30 January 2024 11:36 UTC](https://forum.devtalk.com/t/pythonic-programming-tip-5-contradicts-pep-8/14082/4 "2024-01-30T11:36:59Z")

</div>

@onyx-and-iris I think that the author, Dmitry Zinoviev, @aqsaqal has acknowledged this as an error and will fix it if we do another printing. Dmitry–is that accurate?
