Hack or beauty?

2026-05-13 Thread Michael F. Stemper via Python-list
I have a program that does some calculations for multiple different values of a certain quantity. I wanted to either write a second program that would hold the first quantity fixed and loop over a different one, or to extend the first to do either of those based on a command-line option. While no

Re: Hack or beauty?

2026-05-13 Thread Mark Bourne
Michael F. Stemper wrote: I have a program that does some calculations for multiple different values of a certain quantity. I wanted to either write a second program that would hold the first quantity fixed and loop over a different one, or to extend the first to do either of those based on a com

Re: Hack or beauty?

2026-05-13 Thread Chris Angelico via Python-list
On Thu, 14 May 2026 at 06:40, Michael F. Stemper via Python-list wrote: > for variable in angles if options.angle else comps: > > What I'd like to know is: Is this an egregious abuse of the > language, or is it perfectly pythonic? > > Opinions, and even violent disagreement, are solicited. > Perf