all versions of python fail to indent after conditional statement

Mats Wichmann mats at wichmann.us
Fri Apr 2 12:16:27 EDT 2021


On 4/2/21 9:42 AM, Joe Pfeiffer wrote:
> It's not a bug, it's a design choice you are disagreeing with:  managing
> indentation is your job, not the interpreter's.  For anything other than
> an absolutely trivial three-line script, I write in an editor that does
> a good job helping me manage indentation (in my case, emacs in Python
> mode).

The Python interactive interpreter is very useful for doing quick 
experiments in, but for any kind of serious work, you definitiely want 
an editor with an understanding of Python syntax to help you out.  Even 
the included IDLE development environment will auto-indent for you.  So 
will vim, emacs, Visual Studio Code, PyCharm, Eric, Atom, Wing IDE and a 
host of others.  No need to get frustrated!!!


> <mikedianeterry at gmail.com> writes:
> 
>>     The following snap shot of system prompt illustrates my problem. I have
>>     tried 3.8, 3.92 and 3.10 with the same result. When I run in the window
>>     interface it doesn't even display one row of ... but does print if I hit
>>     return twice. I'm new to Python and was excited about learning it but am
>>     becoming very frustrated over a bug in such a simple conditional statement
>>     - please help as I would really like to master Python.




More information about the Python-list mailing list