Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: ram@zedat.fu-berlin.de (Stefan Ram) Newsgroups: comp.lang.python Subject: Re: Hack or beauty? Date: 13 May 2026 21:04:59 GMT Organization: Stefan Ram Lines: 19 Expires: 1 Mar 2027 11:59:58 GMT Message-ID: References: <10u2hla$2tnlr$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de YMMLdaiN1nRcpleNkywP2QgSx6qpczJF6i+ScaWAjZgDTG Cancel-Lock: sha1:R55/Uuin9GFHcMsvoc2j9ijVHn8= sha256:30UzokxUrZIN75VAil0A3Vr2S+vbIRPMvtS6ixKwCps= X-Copyright: (C) Copyright 2026 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. X-No-Archive: Yes Archive: no X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. X-No-Html: yes Content-Language: en Xref: csiph.com comp.lang.python:197787 ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted: >, is fine, but I think what would be a bit clearer might be, >variables = angles if options.angle else comps >for variable in variables: >. Just today, I wrote something similar: if mode == "file": storage_context = FileStorage() elif mode == "database": storage_context = DatabaseStorage( server ) with storage_context as storage: . . . .