this post was submitted on 18 Feb 2024
132 points (98.5% liked)

Python

6233 readers
5 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] nickwitha_k@lemmy.sdf.org 1 points 7 months ago

No. But, it does provide a list of all stdlib libraries and those, like gzip, that are intended to be compatible with the CLI tend to have explicit documentation showing usage (ex. https://docs.python.org/3/library/gzip.html) and provides any other contextual info related to using the library.

Don't get me wrong, grepping through the code is a great way of building skills needed as a professional. Really, I have to do this kind of thing multiple times every week at work. It is, however, also worth noting that Python only uses an "honor system" for public/private functions, methods, and classes so modules having an "if name == 'main'" block doesn't necessarily mean that they are appropriate to use as CLI tools. They might be but, without documentation to back it up, it's an "at your own risk" situation.