Deutsch English Français Italiano |
<vangej$3harq$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Bart <bc@freeuk.com> Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Python (was Re: I did not inhale) Date: Wed, 28 Aug 2024 16:41:07 +0100 Organization: A noiseless patient Spider Lines: 30 Message-ID: <vangej$3harq$1@dont-email.me> References: <uu54la$3su5b$6@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> <vam36p$3avsi$1@dont-email.me> <20240828082521.00005968@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 28 Aug 2024 17:41:08 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1407973ec3a2d1c19c9aff4f00a8367c"; logging-data="3713914"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sDOzCRYiGVtnmZDOWvPT1" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:PGsNOfNAmI39LPFFgIvsKtTDDto= Content-Language: en-GB In-Reply-To: <20240828082521.00005968@gmail.com> On 28/08/2024 16:25, John Ames wrote: > On Wed, 28 Aug 2024 02:48:59 -0000 (UTC) > Sebastian <sebastian@here.com.invalid> wrote: > >> At my company, somebody tried to delete a method like method2() above, >> but forgot the last few lines (represented by call6()). This does >> not introduce a SyntaxError. Instead, call6() is now part of method1() >> because it's at the same level of indentation. In most programming >> languages, the beginning of method2() would be preceded by some >> delimiter marking the end of method1(), which would prevent an >> accidental merger of this type. > > (Waiting for the Python advocates to fire back with "well, don't do > that, then!" and completely miss the point that it's exactly the topic > of contention here that Python's scope-by-layout approach that makes it > easy to do that...) > Or they will say that whoever deleted method2 could also have deleted that 'end' line if one was used. Whilst also forgetting to delete method2's own 'end' line. Or maybe they deleted method2 plus both the preceding and succeeding lines so that method1 merges into method3. Generally, they might point all the ways that such oversights and all kinds of other typos can result in still-valid code in any language. But fragile syntax like Python's just makes it so easier to do that.