This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [python][rfc] rename getter function and methods
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: archer ml <archer at sourceware dot org>
- Date: Fri, 05 Dec 2008 15:55:15 -0700
- Subject: Re: [python][rfc] rename getter function and methods
- References: <1228513302.11550.177.camel@localhost.localdomain>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
Thiago> Here are the patches which implement the renaming I mentioned earlier.
Thiago> In some cases, I changed the code from a getter method to an object
Thiago> attribute. In other cases, I just stripped the "get_" prefix. I also
Thiago> renamed the functions in C to try to keep some consistency.
Thanks for doing this.
Thiago> I only changed from method to attribute in cases where the value is
Thiago> trivially obtained or computed from GDB's internal structure, and also
Thiago> only if the value can't change from one read of the attribute to the
Thiago> next (i.e., change behind the python script's back). So, for cases when
Thiago> GDB has to do non-trivial computation (or even an access to inferior
Thiago> memory), I kept it as a method. Also, if the value can change over time,
Thiago> I kept it as a method.
Sounds reasonable.
Thiago> I didn't commit anything since these patches will break existing scripts
Thiago> (they adapt the scripts which are committed in the repository, though),
Thiago> so posting as RFC first.
In this case it is nice to have a chance to comment first.
In general though it is too early for us to worry about API
stability. Anybody using this branch ought to be aware of this.
Tom