This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python][rfc] rename getter function and methods


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]