I've been learning python recently and one thing that has confused me is it's strictness on file formatting. What do you mean? I mean if you fuck the format up of your python script it will give you an error, usually a "EOL" error. There was an error in your program: EOL while scanning single-quoted string. EOL stands for End Of Line. This error means that there was an open quote somewhere, but the line ended before a closing quote was found. Another type of syntax error will simply say invalid syntax. Python is super sensitive to file formatting and what you do with whitespace, you have to be consistent.
If you're going to cut and paste code from stack overflow you better hope all of those people stuck with the same code formatting as you. (spoiler, they didn't). You're going to end up formatting a lot of code, most IDE's can do this automatically but you will have to search how for yourself. I like python, it's easy to learn. But be careful with formatting. Weird fact: Python was names after Monty Python and the flying circus.
0 Comments
Leave a Reply. |
|