Comment

Comment by kd0amg

> Python's OOP is awkward with object.f() meaning something different from f(object), when really they ought to mean the same thing.

Why should they? Coming from other OO languages, I would expect `object.f()` to involve a vtable lookup, or something similar that effectively has `object` carrying around its own particular implementation of `f` (which might have been closed over some hidden internal state as well), and I'd expect `f(object)` to not do anything of the sort.

> In Pandas, you sometimes have a function with the same name as a method, which behave subtly different from each other.

This sounds more like a poorly designed library than any language-level awkwardness.

parent kd0amg 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton