On Fri, May 27, 2011 at 11:59 AM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > def get(list, object): > """Append object to a copy of list and return it.""" > return list + [object] > > For one or two line functions, I think that's perfectly reasonable. > Anything more than that, I'd be getting nervous.
But even for something that short, why do it? Why not call the parameter 'lst' or something? Shadowing with something completely different is seldom going to give major advantage, and has the potential to be quite confusing. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list