Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail From: 2QdxY4RzWzUUiLuE@potatochowder.com Newsgroups: comp.lang.python Subject: Re: Common objects for CLI commands with Typer Date: Mon, 23 Sep 2024 14:51:49 -0500 Lines: 21 Message-ID: References: <87tteayavt.fsf@zedat.fu-berlin.de> <28833A4D-B57C-4195-87BF-FAAF9EFF5F19@barrys-emacs.org> <1E3ED29E-161E-430C-9E99-F89266472ADB@barrys-emacs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-berlin.de RUwGCqVKPF8ZQTkVB8V3DAWV5i5YSlbEzeJUdmcwiVKA== Cancel-Lock: sha1:GAv1/dBsWUBOf6fgETjTZVZ+iwk= sha256:wlq0oXgM28CwsPqciPTkOgNaHCCwx59rC9d1oNcQRHU= Return-Path: <2QdxY4RzWzUUiLuE@potatochowder.com> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=potatochowder.com header.i=@potatochowder.com header.b=ZNMeonAC; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; ':-)': 0.09; 'dan': 0.09; 'methods,': 0.09; 'received:78': 0.09; '"too': 0.16; 'barry': 0.16; 'definitions': 0.16; 'discipline': 0.16; 'elsewhere': 0.16; 'flexibility.': 0.16; 'from:addr:2qdxy4rzwzuuilue': 0.16; 'from:addr:potatochowder.com': 0.16; 'functions.': 0.16; 'namespaces': 0.16; 'received:136.243': 0.16; 'received:78.46': 0.16; 'received:www458.your-server.de': 0.16; 'received:your- server.de': 0.16; 'wrote:': 0.16; 'python': 0.16; 'probably': 0.17; 'to:addr:python-list': 0.20; 'languages': 0.22; 'code': 0.23; 'received:de': 0.23; 'idea': 0.24; '(and': 0.25; 'programming': 0.25; 'classes': 0.26; 'module': 0.31; 'program': 0.31; 'python-list': 0.32; 'received:136': 0.32; 'sep': 0.32; 'but': 0.32; 'subject:for': 0.33; 'header:In-Reply-To:1': 0.34; 'people': 0.36; 'using': 0.37; 'class': 0.37; 'could': 0.38; 'helps': 0.60; 'great': 0.63; 'once': 0.63; 'your': 0.64; 'vary': 0.76; 'big,': 0.84; 'scott': 0.84 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=potatochowder.com; s=default2305; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/DkUhFBIOEVP2ysLswXvo/BEl0r7Dfz+tB5yUvk7iqE=; b=ZNMeonAC8lxNaijLIOWZV7s+S6 IHUTAZgQRPcFBZax/waYV3SYHRK6JSIbkiBVdaULv+Su9P+h77EzbB0/L8S90FLLK4ZHeziX0QXMh T3VdN8qZGKJWh90ouhWmdhbAeGZKsus0y0vEY9hlsxGtWzGHsl3QM2Gj/DhSxIkO0aErvQaBOZwMZ 63+8yT3zPFmRHlRD5NnWMhOnHa3KSietZNd5scXTwsFPd688hofMWatIbFudJjBVkiVgZHPs29puE 07zZfVAqpQjilY1iNPjEAo8xa26YPJgMfm/Yfa0Ij9cQ2pfqtUFWbaf1tTlUXrnDm7v3m9nfl8nKx vm0ofkgw==; Mail-Followup-To: python-list@python.org Content-Disposition: inline In-Reply-To: <1E3ED29E-161E-430C-9E99-F89266472ADB@barrys-emacs.org> X-Authenticated-Sender: 2QdxY4RzWzUUiLuE@potatochowder.com X-Virus-Scanned: Clear (ClamAV 0.103.10/27407/Mon Sep 23 10:31:24 2024) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <87tteayavt.fsf@zedat.fu-berlin.de> <28833A4D-B57C-4195-87BF-FAAF9EFF5F19@barrys-emacs.org> <1E3ED29E-161E-430C-9E99-F89266472ADB@barrys-emacs.org> Bytes: 5034 On 2024-09-23 at 19:00:10 +0100, Barry Scott wrote: > > On 21 Sep 2024, at 11:40, Dan Sommers via Python-list wrote: > But once your code gets big the disciple of using classes helps > maintenance. Code with lots of globals is problematic. Even before your code gets big, discipline helps maintenance. :-) Every level of your program has globals. An application with too many classes is no better (or worse) than a class with too many methods, or a module with too many functions. Insert your own definitions of (and tolerances for) "too many," which will vary in flexibility. (And as was alluded to elsewhere in this thread, you could probably deduce the original and/or preferred programming languages of people with certain such definitions. But I digress.) $ python -m this|grep Namespaces Namespaces are one honking great idea -- let's do more of those!