"list(map(lambda" is typically a hint that you should think about a list comprehension...
items = [arg+dflt for arg, dflt in zip(real_args, defaults)] Similar two lines earlier,perhaps defaults = ["=" + repr(name) for name in fob.__defaults__ or []] I also wonder if inspect.py doesn't have an API for this; IIRC CallTips.py was written before inspect.py existed. --Guido On 8/25/07, kurt.kaiser <[email protected]> wrote: > Author: kurt.kaiser > Date: Sun Aug 26 06:18:40 2007 > New Revision: 57495 > > Modified: > python/branches/py3k/Lib/idlelib/CallTips.py > Log: > Fix another map(...) --> list(map...) > > > Modified: python/branches/py3k/Lib/idlelib/CallTips.py > ============================================================================== > --- python/branches/py3k/Lib/idlelib/CallTips.py (original) > +++ python/branches/py3k/Lib/idlelib/CallTips.py Sun Aug 26 06:18:40 > 2007 > @@ -152,7 +152,7 @@ > defaults = fob.__defaults__ or [] > defaults = list(map(lambda name: "=%s" % repr(name), defaults)) > defaults = [""] * (len(real_args) - len(defaults)) + defaults > - items = map(lambda arg, dflt: arg + dflt, real_args, defaults) > + items = list(map(lambda arg, dflt: arg + dflt, real_args, > defaults)) > if fob.__code__.co_flags & 0x4: > items.append("...") > if fob.__code__.co_flags & 0x8: > _______________________________________________ > Python-3000-checkins mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-3000-checkins > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000-checkins mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000-checkins
