parameter name conflict. How to solve?
Greg Ewing
greg at cosc.canterbury.ac.nz
Tue Mar 8 17:53:26 EST 2005
Bo Peng wrote:
> def func(output=''):
> output(output=output)
Another solution that hasn't been mentioned yet:
def func(**kwds):
output(output = kwds['output'])
You might want to do some more checking on the
contents of kwds to make sure it doesn't
contain any other nonsense parameters.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list