Sujet : Re: Python (was Re: I did not inhale)
De : commodorejohn (at) *nospam* gmail.com (John Ames)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 28. Aug 2024, 16:25:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240828082521.00005968@gmail.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
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...)