Python Warts

misfeatures and other problems
PERL| PHP| PYTHON| RUBY
What do each of the following programs do? (all answers)
(answer)
#!/usr/bin/python

def add_evil(data=[]):
	data.append(666)
	return data

print add_evil()
print add_evil(["hi there"])
print add_evil()
print add_evil()
answer
PERL| PHP| PYTHON| RUBY
Last modified: March 30, 2006 @ 7:04 MST
Copyright (C) 1996-2017 Selene Scriven