How much is set in stone?

Bjorn Pettersen BPettersen at NAREX.com
Mon Nov 5 18:10:52 EST 2001


> From: Jive Dadson [mailto:jdadson at ix.netcom.com] 
> 
> Chris Barker wrote:
> > 
> > While nothing is actually set in stone, some things are pretty well 
> > cemented in.
> > 
> > Jive Dadson wrote:
> > > Thanks.  Before I submit a formal proposal, let me run it by you 
> > > guys.
> > 
> > That is a good idea, most PEPs start as a discussion here. 
> AN a whle 
> > lot more start that way and nver make it to a PEP.
> > 
> > > I've looked through all the PEPS and I was surprised that my 
> > > suggestion is not already there.  So, here it is.  Please comment.
> > 
> > You can bet that this has been proposed by people new to 
> Python again 
> > and again and again ...
> 
> What does that tell you?

That more people (or more experienced Python programmers) don't see this
as a problem?

[snip]

> > If you start changing that too, you
> > really won't have Python anymore!!
> > 
> 
> The changes I've proposed do not conflict in any way with the 
> "Python-ness" of the language.  If you don't put "option 
> explicit" at the top of your module, it will behave exactly 
> the same as it did before.

Not that I'm able to channel Guido, but historically he's been against
adding switches to the compiler to make it behave in some domain
specific way. I'm guessing he would be against "options" that would
basically create two Python syntaxes too. I know I am.

> What we are discussing is not uniquely "Python".  Other 
> languages have had the dubious feature that the first 
> assignment to a variable is its declaration. Invariably, 
> people discover that it was a lousy idea.  The people who USE 
> it discover that.  They misspell a variable name and in doing 
> so they introduce a bug.  The bug may not manifest itself 
> until the code is already shipped.  Even if they do notice 
> the bug before it's too late, it may be very difficult to 
> track down.  I've been down that road a lot of times.

Note that this happens *only* when your misspelling is on the lhs of an
assignment statement, in *all* other contexts the compiler will complain
at you. I've written several large Python projects and I've never run
into this problem -- i.e. it's not high on my priority list. If it's
important to you I would suggest you run PyChecker
(http://pychecker.sourceforge.net/) on the code...

god-save-us-from-the-newly-converted'ly y'rs
-- bjorn




More information about the Python-list mailing list