Deutsch   English   Français   Italiano  
<vam36p$3avsi$1@dont-email.me>

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: Sebastian <sebastian@here.com.invalid>
Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc
Subject: Re: Python (was Re: I did not inhale)
Date: Wed, 28 Aug 2024 02:48:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <vam36p$3avsi$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>
Injection-Date: Wed, 28 Aug 2024 04:48:59 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7d3792c96156c5be2e77b3bcd54591a8";
	logging-data="3506066"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19pwNhBW0MG0f5enI5cHqxggUTOWSTBq20="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-18-amd64 (x86_64))
Cancel-Lock: sha1:w6+AU4GBfBYe31UeDEPMtjGY7ak=
Bytes: 2873

In comp.unix.programmer Richard Kettlewell <invalid@invalid.invalid> wrote:
> John Ames <commodorejohn@gmail.com> writes:
>> But even if that helps you organizationally, it doesn't resolve issues
>> of the interpreter potentially mis-parsing things due to mismatches in
>> tab/space factor between $EDITOR and the Python RTE, which is a truly
>> ridiculous thing to have to be concerned about.
> 
> In many years of using Python routinely and extensively I?ve simply
> never found the whitespace issues that people are worrying about here to
> be a problem in practice. Some of this may be a matter of experience but
> if so, it?s a form of experience that must have built up very quickly.

I've seen bugs in production that are due to Python's indentation rules.
Consider this class:

class Foo:
    def method1(self):
      call1()
      call2()
      call3()

    def method2(self):
      call4()
      if some_condition:
          with some_object() as o:
              call5()
              # hundreds of other lines of code
      call6()

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.