Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Python Programming/Naming conventions

From Wikibooks, open books for an open world
<Python Programming

There are various naming conventions used in Python programs.

PEP 0008 specifies naming conventions for class names (e.g. GenericTree), package and module names (e.g. generictree and generic_tree), function and variable names (storestate or store_state; mixedCase is dispreferred), and more. Google Python Style Guide follows similar naming conventions.

The above stands in contrast to Java naming convention (e.g. storeState for method names) and C# naming convention (e.g. StoreState for method names).

In Python 2, the standard library contains multiple deviations from PEP 0008. For instance, Tkinter module is spelled as Tkinter with capital T; this was renamed to tkinter in Python 3.

External links

[edit |edit source]
Retrieved from "https://en.wikibooks.org/w/index.php?title=Python_Programming/Naming_conventions&oldid=3410784"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp