> > I used to cringe a little at the whitespace thing. Now > I > > just don't care. Almost everybody I know who cringes > ends > > up not caring. But, I think, that topic has gotten > beaten > > to death. The only syntax flakiness that I even think > > about sometimes is that trailing ':' after if > statements, > > for loops, etc. > > I think Elizabeth was in favor of the 'whitespace thing'. > I too find it odd that this is considered by many to be a > a deficiency in Python because I think it's great. At > first, I was a little skeptical but when I realized that I > can't stand when people don't indent properly, I > reconsidered. >
I believe she was, too. I just found it interesting because so many people complain about it. Indent properly is subjective in just about every other language. It can be maddening when other people's version of 'proper' does not match your own :-)
> I would even like to use this idea to create a simplified > form of XML equivalent documents. When I've suggested > this in the past, people have claimed that whitespace is > 'dangerous' because it's too easy to change. >
I don't think easy to change is the issue. Easy to confuse tabs and spaces is what causes problems. All text is easy to change. whitespace is annoying because it is hard to see.
> Has anyone ever had this occur to them in Python where > reformatting the code changing the meaning? It seems kind > of like a theoretical problem.
The only issue I've had with whitespace is in moving from one editor to another loading old code where tabs are used instead of spaces. emacs untabify is a lifesaver in cases like this. But then, the meaning doesn't really change, the code just doesn't run.
> > > I used to cringe a little at the whitespace thing. > Now > > I > > > just don't care. Almost everybody I know who cringes > > ends > > > up not caring. But, I think, that topic has gotten > > beaten > > > to death. The only syntax flakiness that I even think > > > about sometimes is that trailing ':' after if > > statements, > > > for loops, etc. > > > > I think Elizabeth was in favor of the 'whitespace > thing'. > > I too find it odd that this is considered by many to be > a > > a deficiency in Python because I think it's great. At > > first, I was a little skeptical but when I realized that > I > > can't stand when people don't indent properly, I > > reconsidered. > > > > I believe she was, too. I just found it interesting > because so many people complain about it. Indent properly > is subjective in just about every other language. It can > be maddening when other people's version of 'proper' does > not match your own :-)
What I mean is inconsistently or in confusing ways. I've seen code like this:
if (a) blah;
if (b) blah;
if (c) blah;
Or where nested ifs were not indented compared to their parents. I've seen just plain random indentation.
Code formatters help with this but can make it hard to track changes in source control, if not done carefully. Mostly, I annoys me that people can be so sloppy. It's no surprise I find so many bugs in this kind of code.
> What I mean is inconsistently or in confusing ways. I've > seen code like this: >
> if (a) blah;
> if (b) blah;
> if (c) blah;
>
> Or where nested ifs were not indented compared to their > parents. I've seen just plain random indentation. > > Code formatters help with this but can make it hard to > track changes in source control, if not done carefully. > Mostly, I annoys me that people can be so sloppy. It's > s no surprise I find so many bugs in this kind of code.
>>What are the warts, and what have you found Python to be especially good or bad for?
Warts? As another poster already noted- the complexity of distributing python apps is problematic. Not only is the interpreter not always present by default, but anyone wanting to distibute apps to end users as pyc code has to worry about which verion or generate the cryptic 'bad magic number' messages. (why can't installations deal with prior version pycs?)
Good for....web apps where the app resides on the server and distribution is not an issue :)
Thank you all for your contributions. I have been heavily occupied elsewhere since writing the post (and have already written a couple of pieces for the magazine, editorial schedules being what they are), but this gives me a huge vein of interesting stuff.
The pieces I have done so far have mostly been opinion. I will, in response to clear demand, be trying to ensure from now on that every piece includes at least a little code.
Flat View: This topic has 19 replies
on 2 pages
[
«
|
12
]