parameter name conflict. How to solve?

Duncan Booth duncan.booth at invalid.invalid
Tue Mar 8 16:47:11 CET 2005


Bo Peng wrote:

> Thank everyone for the quick responses. All methods work in general. 
> Since func() has to take the same parameter set as some other functins, 
> I can not use  func(output='', output_fn=output). "output_alias=output" 
> etc are fine.

One suggestion that I haven't seen so far:

Where does this mysteriously named function 'output' come from? If it is 
defined in another module, then simply call it qualified by the module 
name.

i.e. if the code looks like:

   from othermodule import output

   def func(output=''):
      output(output=output)

change it to:

   import othermodule

   def func(output=''):
      othermodule.output(output=output)




More information about the Python-list mailing list