Making the len function work on your Python objects

Publicado el: 02 octubre 2023
en el canal de: Python Morsels
250
9

Want the built-in `len` function to work on your Python objects? Your class needs a `__len__` method!

https://pym.dev/making-the-len-functi...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 The len function only works on objects that have a length
00:41 How to make instances of your class have a length?
01:41 Use a _len_ method to give your Python objects a length


En esta página del sitio puede ver el video en línea Making the len function work on your Python objects de Duración hora minuto segunda en buena calidad , que subió el usuario Python Morsels 02 octubre 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 250 veces y le gustó 9 a los espectadores. Disfruta viendo!