Whats so good about Python?

Philip Swartzleonard starx at pacbell.net
Wed May 8 15:07:20 EDT 2002


Russell E. Owen || Wed 08 May 2002 11:38:02a:

> Nothing is perfect. Things I don't like about Python include
> (everybody will have their own list, of course):
> [various]
> - Lack of explicit variable declarations. This makes use of local 
> variables vs variables you can see because you are in another
> function's scope a minefield.

Hm. Would it be helpful to have some kind of flag or something that
prevents a name from attempting to access a variable outside of the
local scope? That is, something like: 

def foo:
    	lactose = 666
    	[45 lines of code]
    	if $lactose < 12:
    	    	kill_things_and_drink_alot(dwarves, $lactose)

Were $ is a flag saying 'do not attempt to access the variable from
outside of the local scope'. Yeah, i know it's ugly and peraly, but I
can't think of a better way on short notice. 


-- 
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com



More information about the Python-list mailing list