Writing python code causes indentation errors
Bug #1592686 reported by
Zisu Andrei
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scratch |
New
|
Undecided
|
Unassigned |
Bug Description
If I have the following code
import smbus
print (smbus.__file__)
import RPi.GPIO as GPIO
I need to add a tab before the print line to move it to the same indentation level. Unfortunately, Scratch adds 4 spaces instead of a tab, like the other lines have, so running the script yields "IndentationError: unindent does not match any outer indentation level", which seems to come from this mixing of spaces with tabs.
I think the editor should be aware of the tab style of the line before (tab vs space) and try to copy it.
description: | updated |
description: | updated |
To post a comment you must log in.