[Tutor] Deleted dictionary length not reporting
Jim Mooney
cybervigilante at gmail.com
Wed Jul 17 20:52:13 CEST 2013
On 17 July 2013 03:01, eryksun <eryksun at gmail.com> wrote:
> del some_list[:] # DELETE_SUBSCR
> some_list[:] = [] # STORE_SUBSCR
> some_list.clear() # CALL_FUNCTION
And the obvious gotcha for del, since I am great at tripping over them, is:
>>> l = [1,2,3]
>>> del l[:]
>>> l
[]
>>> del l
>>> l
Traceback (most recent call last):
--
Jim
"Yea, I say unto you, listen not to fat gasbags, for the poor, too,
are deserving of a good life. When they bring unto you their
Government Cheese, do thou render unto them a trade in beer and
cigarettes." --Jesus the Christ
More information about the Tutor
mailing list