On Oct 6, 2004, at 11:49 PM, Leopold Toetsch wrote:

Jeff Clites <[EMAIL PROTECTED]> wrote:

3) I won't mention the problem of languages which allow an object to
have instance variables and instance methods of the same name (so that
in Python, "a.b" would be ambiguous if "a" is an object from such a
language).

Well, Python has that very problem. By dynamically defining an instance variable, a method with that same name becomes inaccessible.

Well, for Python itself that's not a problem per se, it's a fundamental part of the design--there's only one slot for a given name, and it can hold a sub or something else, but it's just one slot. (You don't really have named methods, you just have named slots that may or may not hold subs.) That's just the way Python objects work. But for objects coming over from another language, you might really have separate slots for subs v. data, but if these are accessed from Python code, you don't have a way to specify which one you mean. It's very similar to the namespace problem with language crossing.


JEff



Reply via email to