why del is not a function or method?

Lele Gaifax lele at metapensiero.it
Mon Oct 16 13:33:35 EDT 2017


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.




More information about the Python-list mailing list