home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 133,671 of 135,536   
   =?UTF-8?Q?St=C3=A9phane?= CARPENTIE to All   
   Re: Python   
   19 Dec 25 20:57:15   
   
   XPost: alt.folklore.computers   
   From: sc@fiat-linux.fr   
      
   Le 15-12-2025, c186282  a écrit :   
   > On 12/14/25 06:56, Stéphane CARPENTIER wrote:   
   >> Le 14-12-2025, c186282  a écrit :   
   >>>   
   >>>     NOT sure why so many people want to trash Python.   
   >>   
   >> My issues with python are:   
   >> - It's using indentations, so when I comment a block of code to see   
   >>    what happens, it breaks everything and I have to manage the   
   >>    indentations. I can't just comment/uncomment a block of code as I do   
   >>    with other programming languages.   
   >   
   >    You CAN do block comments BTW ... use triple-quote at   
   >    the beginning/end. The double and single quote char   
   >    work.   
      
   It's not my issu. Vim is able to comment blocks of code without issue.   
   It's python that can't always manage it. Let say I have that part of   
   code:   
      
   if test1:   
     if test2:   
       do some stuff   
      
   If I comment the second line to see what happens if I remove my test2,   
   like I would do with any normal language, then with python it just   
   doesn't work because it breaks the indentation. So, I have to change the   
   indentation at the same time. And when there are many lines of code, it   
   can be difficult to see with which if the else is related. It's an   
   example. I could want to remove a loop to get faster to the point with   
   only a value and it's the same issue.   
      
   >    Indents ... well ... those have been good programming   
   >    practice since forever.   
      
   I have no issue with indentation. I would find awful a program displayed   
   on only one line of code or a program with many lines without   
   indentation.   
      
   >    With Python they are also   
   >    functional, not just 'decorative'.   
      
   And that's where the issue begins. Because sometimes indentation matters   
   and other times that matter differently, for example in a function call   
   the parenthesis it's taken care differently.   
      
   >    but Python   
   >    isn't THAT hard to deal with. Typically use just TWO   
   >    space indents to keep line-lengths shorter. A few   
   >    editors put in vertical guide lines to help keep   
   >    Python code right.   
      
   It's not that easy to read a program with many lines   
      
   >> - It's sold as an easy programming language. Which is true for   
   >>    discovering it. And once I'm using it in the real life, I   
   >>    discover the hard reality. A lot of things that should just work don't   
   >>    because it's an exception.   
   >   
   >    Umm ... haven't had many problems myself - and I came   
   >    from COBOL, FORTRAN, Pascal, C .......   
      
   Sometimes with libraries I have to parse files or databases, I have to test   
   "var is None or var == 'None' or var ==''" because it depends on things   
   I don't understand and it's not my job to spend time on programming. I   
   have to debug or improve the programs I inherited, but my job is to use   
   them, not to program them.   
      
   --   
   Si vous avez du temps à perdre :   
   https://scarpet42.gitlab.io   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca