From: "trans. (T. Onoma)" Date: 2004-12-08T22:48:26+09:00 Subject: Re: Idiom for creating hash from two arrays On Wednesday 08 December 2004 08:30 am, Glenn Parker wrote: | Jonathan Paisley wrote: | > On Wed, 08 Dec 2004 05:43:42 +0900, trans. (T. Onoma) wrote: | >>On Tuesday 07 December 2004 12:42 pm, Jonathan Paisley wrote: | >>| def Hash.from_pairs(keys,values) # or some better name | >> | >>zipnew ? | > | > Hash.zipnew ... I quite like the similarity to Hash.new, and the | > inclusion of the already familiar zip idea is also a good thing. | | Why does it need a new name? Instead, why not extend Hash.new to do | this when it is passed two arrays? It seems pretty natural to me, and I | don't see any conflict with existing usage. I guess b/c Hash.new already takes a hash-default. Perhaps with keyword arguments... T.