Why is del(ete) a statement instead of a method?

Terry Reedy tjreedy at udel.edu
Wed Oct 9 17:04:48 CEST 2002


"Greg Brunet" <gbrunet at sempersoft.com> wrote in message
news:beed1880.0210090508.4408c32d at posting.google.com...
> So why don't all objects support a .del method?

Until recently (2.2? and maybe still for some), many types did not
methods or indeed attributes of any kind.  Historically, functions
applying to all or many types have been  builtin functions.  id(),
type(), len(), *attr(), dir(), ???

Terry J. Reedy





More information about the Python-list mailing list