From: Rene v. P. <ren...@gm...> - 2012-10-19 07:22:04
|
On 17 October 2012 01:12, Scott C. Livingston <sli...@ca...>wrote: > The documentation for root_locus() (in rlocus.py) claims two return > values, whereas there is actually only one: the root list, "rlist". > > rlocus() in matlab.py has default argument klist=None. Inside the > function body, if klist is found to be None, then it is set to logspace(-3, > 3). Is there a reason to do that rather than use > > def rlocus(sys, klist = logspace(-3, 3), **keywords) > > There is a valid reason for this, see for example http://www.deadlybloodyserious.com/2008/05/default-argument-blunders/ Also, since at the end of the function klist is returned, if that list is kept by the application and later modified, the next call to rlocus will have strange results. Should I start sending patches instead of complaining? :-) No, use the discussion list first, that is what it is there for. > Thanks, > You are welcome. René |