Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The thing is, you have to consciously write code and cant just do for example
list
.something
.something
Because its a syntax error -
SomeNone7115yThis. Of course there are corner cases but most of the time, it is really obvious where you need to indent, and with a sufficiently intelligent editor it's not even half a challenge to get right.
-
SomeNone7115yNot sure if Python allows tabs… F# doesn't—spaces only!—because tabs mean different things to different people. Spaces are easy to count.
-
@SomeNone tabs are allowed but mixing tabs and spaces within the same file results in an error
-
mostly a preference. I love Python for itd piwer but hate the lack of static typing as well as the indentation. Does this make it horrible? not by a large margin since the benefits outweigh the cons imo, but i still dislike the whitespace and will never like it.
-
I usually have to to change my whole methodology of writing variables and function names when switching from java to pythob which i find irksome.
//Java
Class student{
Student(int id, String name, String address, char gender,
Int totalMks, int totalSubject,...)
{...}
}
=================================
#Python
class Student:
def __init___(self,i,n,a,g,t_mks,t_subj,...):
#stuff
Its nice but gets unintuitive when one tries to limit line length to 80 chars -
@yellow-dog of course, although it does feel weird leaving \ character dangling between your code
Related Rants
I do not understand people who critique Python for using indentation to mark code blcoks. I've seen multiple posts being like "Uhh in Python a missing space breaks everything and it's so hard to find it". Yeah so hard when the interpreter throws a parse error and tells you exactly which line it's on. Let me go back to a bracefest language, misplace a brace halfway through the file, and get told there's a syntax error at the end, and spend a whole two minutes finding it.
rant
braces
indentation
python
syntax