The Future ( was [Bf-python] 2.40 release notes draft )
Stephen Swaney
sswaney at centurytel.net
Thu Dec 22 00:30:06 CET 2005
On Thu, Dec 22, 2005 at 09:47:59AM +1100, Campbell Barton wrote:
>
> can we remove get/set?
What we plan on doing is removing the attribute access methods, the
getStuff() / setStuff() type calls, and replacing these with direct
attribute access. In terms of bpy internals, we are using the
tp_getset slot in the type objects rather than the tp_getattr and
tp_setattr slots.
> The problem is that some getting and setting take Args.
> for setFooBar(a,b)
> could we do..
> ob.fooBar = a,b
In places where the attribute is a sequence, this should still work.
In other places, we will still have methods to do more complex tasks.
Your idea of splitting out certain methods into individual attributes
is a good one.
> It will mean that most scripts wont run anymore but changing will be
> trivial still.
Lots of things will break, but it will give us a better position to
go forward from. There will be screaming from the scripters, but
we can help them thru it.
> This will significantly un-polute the namespace and could even make a
> noticable difference in the speed python scripts run (albeit a small
> difference)
It also has some implications for types vs classes. Another benefit
is that the dir() command is supported without any effort on our part.
The thing with __members__ is a deprecated hack.
--
Stephen Swaney
sswaney at centurytel.net
More information about the Bf-python
mailing list