Write this accumuator in a functional style

Steven D'Aprano steve at pearwood.info
Wed Jul 12 05:32:01 EDT 2017


On 2017年7月12日 17:47:50 +1200, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> - Greg's dict comprehension version requires N+1 passes through the
>> data,
>> one to convert to a list, and 1 per each possible key.
>> Just to be clear, my solution was a response to the requirement that it
> be written in a purely functional style. It's not now I would actually
> recommend doing it!

I never imagined anything else!
-- 
Steve


More information about the Python-list mailing list

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