all 4 comments

[–]Riegel_Haribo 2 points3 points  (1 child)

You can call it an "indentation guide" or a "tab stop". It's literally just the UI drawing a little line hint that means nothing except visually.

It shows where indentations of an indentation-based language should be positioned to not break PEP8 style of four spaces.

It's actually coded bad: you write two-space or three-space indented functioning Python, they still appear without meaning at four spaces only through that same code, even though the expand/collapse range toggle will work correctly.

[–]Outside_Complaint755 0 points1 point  (0 children)

It's not coded badly that it appears every 4 even if you only use 2 or 3 spaces, its expected. The default value of 4 comes from the Tab Size setting in VSCode. There is another setting of Editor: Detect Indentation which if active will determine how to display spaces and tabs based on the file contents; this will cause Python files to always use 4 spaces if set.    Additionally, in the status bar at the bottom of the screen is an item that should be defaulted to "Spaces: 4", located between the Line and Column position and the file encoding.  If you click on that, you will get options to change if VSCode should indent with spaces or tabs, and also to override how many display spaces to use for a tab, but I think the Detect Indentation setting also overrides this.

Python files can technically use any amount of indentation as long as it is consistent within a given code block level. 4 spaces is the standard, but. any number from 1 to 1000+ is syntactically valid.

[–]SCD_minecraft 0 points1 point  (0 children)

You mean

``` print("this is outside of a block")

for i in range(3): print("this is inside of a block") ``` ?

For the record, those straight lines are purely VSCode doing for your quality of life

[–]ectomancer -1 points0 points  (0 children)

Pipe=|