[Python-3000] symbols?
Guido van Rossum
guido at python.org
Wed Apr 19 00:51:00 CEST 2006
On 4/18/06, Jim Jewett <jimjjewett at gmail.com> wrote:
> I was still thinking of symbols, and reading ".name" as syntactic
> sugar for "self.name", with the caveat that the translation was made
> at runtime rather that compile-time.
>
> Therefore
>
> property(._get_x, ._set_x)
>
> would be syntactic sugar for
>
> def __getx(self): return self._get_x()
> def __setx(self): return self._set_x()
> property(__getx, __setx)
>
> except that the __getx and __setx methods wouldn't be added to the
> visible namespace, even in mangled form.
Please stop. This is getting ridiculous. Do you realize that you are
describing that the expression
.foo
is syntactic sugar for
lambda self: self._foo()
?
That's not what I would call a "symbol type" by any stretch of the imagination.
(And if you're claiming that
.foo
is not "an expression" then how can it appear syntactically in the
position of a parameter?)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list