Prothon Prototypes vs Python Classes

Michael mogmios at mlug.missouri.edu
Mon Mar 29 08:51:59 EST 2004


>I don't have very much sympathy for people who
>use poor editors to write programs.  I've got a lot of
>sympathy for people who are stuck with defective
>rendering and printing programs for analyzing programs
>that they didn't write in the first place, though. Note that
>Python, which is mostly what we're talking about on this
>newsgroup, comes with a reasonably competent editor
>called Idle. There are very few environments where you
>can use Python at all where you can't use Idle.
>  
>
I have sympathy for neither. If your editor sucks then change it. If 
your printing program sucks than change it. I've never bothered using 
Idle as I don't like GUI-based editors so I wouldn't really be familiar 
with how it behaves.

>I've never seen variable width fonts to change the width
>of spaces on the left, unless it was doing something like
>full justification.
>  
>
I have, but then I throw such editors out after a single glance.

>As far as rendering programs, the most obvious
>culprit is OE, which for all of its defects and security
>problems, is still one of the most used mail and newsgroup
>clients out there.
>  
>
Do people actually post and read a lot of source code on mail or 
newsgroup lists? Is that the main reason for not using tabs in code? 
That'd seem a bit odd to me. Never actually tried using OE to read code. 
I really don't use OE. Why wouldn't you just open the code in your code 
editor of choice?

>I'll also point out that even programs that properly follow
>the tab "standard" will not render well since the standard
>is that a tab goes to the next multiple of 8. The number
>8 has nothing to do with readability: it was decided on
>as the best compromise on compressing the number of
>characters going over a line when line speeds were *very*
>slow and teletypes really were electromechanical monsters
>with these little metal stops called 'tabs' in the back.
>  
>
What difference does it make what the standard length of a tab is as 
long as it remains the same throughout the program? As long as the size 
is uniform it should render just fine.

>There is, of course, no standard at all for how to change
>the default tabbing in programs, which means that one
>has to deal with each and every one on an individual
>basis - if it's even possible.
>  
>
Again, as long as it's uniform does it matter? It won't change the logic 
of the code as long as it opens a tab as a tab and saves a tab as a tab. 
If you can't trust your editor to do something that basic then trash it.

>Reading the source for Idle is quite
>enlightening: there is a comment about Tk doing something
>rather absurd if you change the tab default.
>  
>
I've glanced at it but never really read it. Why would Tk care what the 
tab default of your editor is? In the source it's still a single tab 
character.

>Any programming editor worth the name will insert spaces
>when you use the tab key; likewise it will adjust with the
>backspace key. This is not a problem unique to Python,
>after all.
>  
>
No, a good editor will do nothing you don't tell it to do. A good editor 
will insert a tab when you insert a tab and delete a tab when you delete 
a tab. Why should it use spaces to simulate a tab when you can just use 
a tab? That sounds like needless complexity.

>The same comment applies to variable width fonts. A good
>programming editor will not use them.
>  
>
Agreed. I wouldn't use one that did use them.




More information about the Python-list mailing list