newbie questions

Garrett G. Hodgson garry at sage.att.com
Fri Jun 11 20:03:55 CEST 1999


Jeff Norden wrote:

> 1) Is there no equivalent to perl's  "use strict" in which all variables
> have to be declared?

nope.

> 2) Is the above the correct way to increment a variable?  I can't find an
> equivalent for "++" or "+="

var = var + 1

> 3) These are rather minor, but is there no way to "forward declare" function
> definitions?  I'd rather put them at the end of the file instead of the
> beginning.

def main():
	func1()
	func2()

def func1():
	print 'func1 called'

def func2():
	print 'func2 called'


if __name__ == '__main__':
	main()



-- 
Garry Hodgson			comes a time
garry at sage.att.com		when the blind man
Software Innovation Services	takes your hand, says,
AT&T Labs			"don't you see?"




More information about the Python-list mailing list