Why does Python code use len() function instead of a length method?

Publié le: 04 mars 2023
sur la chaîne: The Python Oracle
2
0

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2

--

Chapters
00:00 Question
00:24 Accepted answer (Score 197)
01:04 Answer 2 (Score 110)
02:48 Answer 3 (Score 40)
04:59 Answer 4 (Score 36)
05:13 Thank you

--

Full question
https://stackoverflow.com/questions/2...

Accepted answer links:
[len()]: http://www.python.org/doc/2.5.2/lib/b...
[Emulating container types]: http://www.python.org/doc/2.5.2/ref/s...
[Python and the Principle of Least Astonishment]: http://lucumr.pocoo.org/2011/7/9/pyth...

Answer 2 links:
[this question]: https://stackoverflow.com/questions/8...

Answer 3 links:
[PyVarObject]: http://hg.python.org/cpython/file/8c8...
[Python Data Model]: https://docs.python.org/3.4/reference...
[this one]: http://effbot.org/pyfaq/why-does-pyth...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/l...

--

Tags
#python

#avk47


Sur cette page du site, vous pouvez voir la vidéo en ligne Why does Python code use len() function instead of a length method? durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur The Python Oracle 04 mars 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2 fois et il a aimé 0 téléspectateurs. Bon visionnage!