[Bf-python] Const dict arguments (was: short term goals)
Ken Hughes
khughes at pacific.edu
Tue Jul 19 23:43:15 CEST 2005
Willian Padovani Germano wrote:
> Stephen and I discussed a little during yesterday's meeting. It is a
> good time to consider an overhaul, making the API more consistent and
> clean, based on things we've learned and feedback from users. A wiki
> page and a forum thread will be used to collect suggestions so we can
> get a clear picture of all needed changes. Specifically about
> getsetters, Stephen suggested that it could be done already, but for now
> we'd also keep the old get/setStuff(). There are a few issues like
> defining strict practices for arguments and return values, but these can
> be solved later w/o much work, if you'd like to start soon on this.
>
> For example, there's a mix of const dicts (ex: Window.Types, etc.) and
> strings (ex: camera.type) being passed as arguments. It'd be nice to
> stick to just one alternative and we favor const dicts (open for
> discussion, of course).
I agree with the const dicts, but I foresee a problem with backward
compatibility for getters. We can make x.setStuff() accept the old
and new argument types, but what type should x.getStuff() return
(same applies to "val = x.stuff")? Should we leave well enough alone?
Should there be an attribute x.paramType which the user can set to
use const dicts instead?
I'll ignore this issue for now unless there's a general consensus on
what to do, and just concentrate on the tp_getset change itself.
Ken
More information about the Bf-python
mailing list