Paul Sokolovsky <pmis...@gmail.com>:
> Python already has that - like, len(x) calls x.__len__() if it's
In fact, what's the point of having the duality?
len(x) <==> x.__len__()
x < y <==> x.__lt__(y)
str(x) <==> x.__str__()
I suppose the principal reason is that people don't like UFCS. Plus some
legacy from Python1 days.
Lisp & co. rigorously follow its UFCS. I think it works great, but that
is what people most ridicule Lisp for.
What do you think? Would you rather write/read:
if size + len(data) >= limit: