The del statement

Marco Aschwanden PPNTWIMBXFFC at spammotel.com
Tue Dec 5 03:17:53 EST 2006


Hi

I was wondering whether the del statment was going to stay in Python3000?

It is a bit awkward to use the del statement where a method call would do  
the same without the need for a new keyword.

del list[elem]
del map[elem]

Where

list.del(elem)
map.del(elem)

would achieve the same result (and I think, this is what happens in the  
backend).

The same discussion was done for the "external" len-function (list.len()  
vs. len(list)).

I don't dare to say that the del-keyword is superflous, but I would like  
to know the pros and cons of the external keyword approach.

Greetings,
Marco




More information about the Python-list mailing list