Argument of the bool function

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Apr 25 22:38:21 EDT 2011


On 2011年4月25日 16:26:37 -0700, Paul Rubin wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>> results = [function() for function in actions]
>> results = map(apply, actions)

Sadly not in Python 3, where map is lazy and you need to add a call to 
list to make it equivalent to the list comp.
-- 
Steven


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /