Common objects for CLI commands with Typer

Barry Scott barry at barrys-emacs.org
Mon Sep 23 14:00:10 EDT 2024


> On 21 Sep 2024, at 11:40, Dan Sommers via Python-list <python-list at python.org> wrote:
> 
> Despite the fact that "everything is an object" in Python, you don't
> have to put data or functions inside classes or objects.  I also know
> nothing about Typer, but there's nothing wrong with functions in a
> module.

Python is great in allowing you to pick your style.
A few lines in a module, a couple of functions or use classes.

But once your code gets big the disciple of using classes helps
maintenance. Code with lots of globals is problematic.

Barry



More information about the Python-list mailing list