Op 2005-12-07, Ben Sizer schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-12-06, Ben Sizer schreef <[EMAIL PROTECTED]>: >> > Of course. However I would argue that indented scope is one way of >> > doing so. Scope is instantly visible, and no longer a game of 'hunt the >> > punctuation character, which is in a different place depending on the >> > coder's style'. >> >> There are situations in which indentation is not that visible. >> >> The problem is that situations arise where your code can't be >> read continuously. e.g. it can be spread over pages in a book. > > Write shorter functions ;)
This has little to do with long functions. A class can contain a large number of methods, whitch are all rather short, and your class will still be spread over several pages. >> Other situations arise where indentation alone isn't a clear >> indication of how many scopes are left. > > No, but I find it's only a tiny bit worse than in C++/Java, where I > usually find myself adding a comment at the end of a block anyway, just > so that I remember what exactly is coming to an end at that point. > (Although again, this might be telling me that my function is too big.) > That transfers to Python where necessary. The fact that your function might be too long, doesn't change that a proper end marker can make the structure of your program more clearer for those reading the code. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list