Concerning Dictionaries and += in Python 2.x

Denis McMahon denismfmcmahon at gmail.com
Wed Jan 21 09:10:48 EST 2015


On Wed, 21 Jan 2015 09:43:31 +0100, Peter Otten wrote:

> There is also dict.from_keys()

See, I learned something too.

> The inner loop is not just inefficient for stock sold in large
> quantities,

Agreed, but as for:

> it will fail for stock sold by weight, volume etc.

I was trying to stay true to OPs original code and not introduce [too 
many] additional complications to his learning exercise.

-- 
Denis McMahon, denismfmcmahon at gmail.com



More information about the Python-list mailing list