I indented it with a tap when I made the Python code
I'm asking because I heard that it's better to float it in space because the length of the tab is different between editors
How are other Python developers using it?
Can there be a conflict between editors because the tap length is different?
coding-style python indentation conventions
PEP-8 Tabs or Spaces? tells you to use space
Spaces are the preferred indentation method.
Tabs should be used solely to remain consistent with code that is already indented with tabs.
Python 3 disallows mixing the use of tabs and spaces for indentation.
Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively.
When invoking the Python 2 command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces. When using -tt these warnings become errors. These options are highly recommended!
I usually use space, but the code that has already written tab says that it is better to keep using tab to maintain consistency.
You can mix space and tab in Python 3, The Python2 shell produces an IndentationError.
>>> def foo():
... print "I'm Tap!"
... print "I'm Space!"
File "<stdin>", line 3
print "I'm Space!"
^
IndentationError: unindent does not match any outer indentation level
>>>
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.