• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    3
    ·
    edit-2
    2 days ago

    IMO all those examples are less readable than writing it in an imperative way using good function and variable names.

    Also, len() is a Python convention and a built-in function that calls __len__() on that object. It’s even more established than .length in JS, so I really don’t see why someone would expect anything else. And even then, one could call my_list.__len__() if they really wanted to be sure and have that “left to right” bonus.