launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07285
Re: Removing attributes and web service backwards compatibility
-
To:
launchpad-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Aaron Bentley <aaron@xxxxxxxxxxxxx>
-
Date:
Mon, 06 Jun 2011 09:54:17 -0400
-
In-reply-to:
<BANLkTim0kMaPCeMdtjkQBMNeauEjALkZ=A@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11-06-03 09:57 PM, Robert Collins wrote:
> So we should:
> - think twice before exposing attributes
You make it sound like attributes deserve special consideration, but an
attribute is equivalent to setter method and a getter method. Their
special syntax is really just syntactic sugar. If we choose to change
the underlying implementation later (so that they actually are a
setter/getter pair), Python will support us.
So I don't think attributes deserve any more consideration than methods.
We now expose attributes and methods in the "devel" API so that we we
have license to change or remove them freely. I don't think the
circumstances that led to Brad's issue still apply.
If you mean "expose attributes" in the broad sense that we expose them
as part of the user model, regardless of how they are manipulated, I can
see some logic in that. But there is a constant push to expose more and
more, so that our web service clients are just as empowered as local
code is. At times, you yourself have championed that.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3s3AkACgkQ0F+nu1YWqI0OTACaAqOe/LsAHfdDQEHb4zjYMirF
uuoAniBBKBUL3kdp50+dRrFC5GAOQ3Bw
=LekQ
-----END PGP SIGNATURE-----
Follow ups
References