why del is not a function or method?

Oren Ben-Kiki python-oren at ben-kiki.org
Mon Oct 16 13:42:00 EDT 2017


The first line says "The major reason is history." :-) But it also gives an
explanation: providing functionality for types that, at the time, didn't
have methods.

On Mon, Oct 16, 2017 at 8:33 PM, Lele Gaifax <lele at metapensiero.it> wrote:

> Oren Ben-Kiki <python-oren at ben-kiki.org> writes:
>
> > So I still think it was a matter of preference rather than a pure
> technical
> > consideration. But that's all second-guessing, anyway. You'd have to ask
> > Guido what his reasoning was...
>
> A rationale is briefly stated in the design FAQs, see
> https://docs.python.org/3/faq/design.html#why-does-python-
> use-methods-for-some-functionality-e-g-list-index-
> but-functions-for-other-e-g-len-list
> and the next one.
>
> ciao, lele.
> --
> nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
> real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
> lele at metapensiero.it  |                 -- Fortunato Depero, 1929.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list