Python Forum

Full Version: issue with syntax
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(Feb-22-2018, 06:51 AM)buran Wrote: [ -> ]
(Feb-22-2018, 06:47 AM)volcano Wrote: [ -> ]Its very hard to use indentation... Is there any alternative to this ?
Well, it's subjective. We think it's very intuitive and results in clean and readable code. There is no alternative.

The only issue with indentation is if the file is big ..it becomes messy ... its very hard to find which is parent and child unless you are using a nice editor with folding options or some sort of viewer.

Thanks for your time.
Indentation should be used with every language. Its not required to run in other languages, but it surely makes it more readable. You should in theory be indenting like this with other languages plus the braces. Python is the same but requires the indentation and can omit the semicolons at the end.

Indentation is not messy but more organized. Being a beginner you should not have long files anyways. It should be split into different modules and classes. If your scrolling over 1k lines in the beginning, chances are you need to organize your code better, not worry about alternatives to indentation. If you share a file of yours (in code tags), im sure i could be more specific.
(Feb-22-2018, 04:13 PM)volcano Wrote: [ -> ]its very hard to find which is parent and child unless you are using a nice editor with folding options or some sort of viewer.
Actually this is way more correct statment when using braces, without requirement for indentation/coherent file structure
Pages: 1 2