The del statement

  • Thread starter Marco Aschwanden
  • Start date
M

Marco Aschwanden

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top