dictionary initialization

Gerrit gerrit at nl.linux.org
Fri Nov 26 12:41:35 EST 2004


Peter Hansen wrote:
> >In my example, it was b[1]+=1. "+=1" should at least tell Python two
> >things: this is an add operation and one of the operands is an
> >integer. 
> 
> Why would it tell Python that?

Well, the rhs of 'foo+=1' is always an integer.

Gerrit.

-- 
Weather in Lulea / Kallax, Sweden 26/11 17:20:
	-8.0°C   wind 6.7 m/s NW (34 m above NAP)
-- 
In the councils of government, we must guard against the acquisition of
unwarranted influence, whether sought or unsought, by the
military-industrial complex. The potential for the disastrous rise of
misplaced power exists and will persist.
    -Dwight David Eisenhower, January 17, 1961



More information about the Python-list mailing list