strict python?
Brian Sturk
bsturk at news.rcn.com
Fri Dec 7 00:45:02 EST 2001
Can python be more strict about declarations? I didn't see a flag to
the interpreter, and haven't seen anything yet in my book or on
www.python.org. I ask because I got burned by something
like this:
def func ( self ):
print hello
def call_func( self ):
self.func <--- no parentheses
my script that had code like this ran fine, but
didn't call the function. I would have thought that
this would have been an error since there was no
assignment of any kind.
It took me a little for me to figure it out in my real
script. It'd be nice to have this stuff pointed out
while parsing it. Is it possible?
thanks
--
.-----------------------------------------------------,-------.
| Brian M. Sturk - http://www.nh.ultranet.com/~bsturk \ C/C++ | .> )\,^a__
|--------------------------| bsturk at nh.ultranet.com | Java | ( _ _)/ /-." ~
| http://www.telengard.com `---------------------------`------| `( )_ )/
| Telengard Technologies Inc. - NT/*nix UI & device drivers | _<_s_<_s
'-------------------------------------------------------------'
More information about the Python-list
mailing list