Darren New <dne### [at] san rr com> wrote:
> Having underlings as part of the name isn't any more "special" than it is in
> C or C++. However, I cannot name my own function "operator'" in C++ because
> the "operator" keyword actually is special syntax.
'operator' is a keyword that's fairly descriptive. '__' in a variable name
as required syntax isn't very descriptive.
> I can name my function
> __quote__ in Python because that function name has no special meaning to the
> interpreter.
That's contradictory with:
> When the interpreter sees "a + b" it first looks to see who implements
> __add__, and then invokes that.
So it does have a special meaning to the interpreter, or it doesn't?
--
- Warp
Post a reply to this message
|