Deutsch English Français Italiano |
<slrnvdp6fp.1s5hi.candycanearter07@candydeb.host.invalid> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Python (was Re: I did not inhale) Date: Sat, 7 Sep 2024 18:30:03 -0000 (UTC) Organization: the-candyden-of-code Lines: 44 Message-ID: <slrnvdp6fp.1s5hi.candycanearter07@candydeb.host.invalid> References: <uu54la$3su5b$6@dont-email.me> <v9m4gd$14scu$1@dont-email.me> <20240815182717.189@kylheku.com> <v9npls$1fjus$1@dont-email.me> <v9t204$2dofg$1@dont-email.me> <va28pi$3dldm$1@dont-email.me> <va2ro9$3gd7v$1@dont-email.me> <va2vt0$3h3gj$1@dont-email.me> <va44rh$3p1l6$1@dont-email.me> <va45eq$3pkt9$1@dont-email.me> <va4aut$3q4g0$1@dont-email.me> <va4fbr$3qvij$1@dont-email.me> <va5108$3tmmd$1@dont-email.me> <va51ok$3tqr9$1@dont-email.me> <va5ec2$3vluh$1@dont-email.me> <va6q4g$c1a7$1@dont-email.me> <va6rpa$c6bg$1@dont-email.me> <va6se9$cb8e$1@dont-email.me> <20240826083330.00004760@gmail.com> <vaises$2k7o6$2@dont-email.me> <20240826155113.000005ba@gmail.com> <wwvo75eicla.fsf@LkoBDZeT.terraraq.uk> <vak9k9$2ujrs$1@dont-email.me> <valgpu$34s18$1@dont-email.me> <vannkg$3ig72$1@dont-email.me> <vanrd8$3j0vv$1@dont-email.me> <vantnp$3j94i$1@dont-email.me> <vapp91$3v4l8$3@dont-email.me> <vaqucc$5ioe$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 07 Sep 2024 20:30:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b640cdd4c5fc632cfffdc5cd9571c38f"; logging-data="1561300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KhH3SfksRILqHWqPt/rt6SwwP/tiOcdAjvqL/bvpvUQ==" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:kQFeFV1KbkKufu785E0Hu8x8uJM= X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]% b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx `~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D Bytes: 3484 Lawrence D'Oliveiro <ldo@nz.invalid> wrote at 22:57 this Thursday (GMT): > On Thu, 29 Aug 2024 14:24:01 +0200, David Brown wrote: > >> def foo(a, b, c) : >> if a : >> if b : >> if c : >> doThis() >> >> That looks unfinished to me. So I will add a "return" at the end (with >> a single tab indent, in this case). > > A redundant “return” ... kind of like my redundant “#end” comments, except > yours work in a more restricted set of places ... > >> Don't you ever just accept that a language is the way it is, and it is >> perfectly useable that way? > > Of course not. > >> Or think that perhaps other people in the world know better than you do >> about how they want their language to work? > > And vice versa. > >> Has it never occurred to you that the people behind a given >> language - such as Python - considered various alternatives and decided >> that making it the way they did was the best choice overall for the >> language they wanted? > > Barring a few obvious stupidities, yes of course they were, and are, smart > people. Subjectively, I prefer early returns over nested ifs: def foo(a, b, c): if !a: return if !b: return if !c: return doThis() -- user <candycane> is generated from /dev/urandom