On Sat, 2002-01-19 at 16:42, Mike Orr wrote:
> It seems like we can adopt properties and __slots__ piecemeal.
> 
> 1) Add a foo = property(foo, setFoo, None, None) call for each property.
> Monitor performance to verify it doesn't go down.  If it doesn't, we're
> no worse off than we were.

If we change all the classes to use getFoo/setFoo instead of
foo/setFoo.  Then it would be fairly easy to create a function that
created the properties automatically (based on these naming
conventions), and we wouldn't have to add 
foo = property(foo, setFoo) lines all over the place.

Then, while old servlets still won't work, it would be relatively easy
to change all ".foo(" occurances to ".getFoo(", and I think that would
probably be a fairly robust translation (as long as we keep track of all
names that have to be changed).

For plain attributes we'd have to leave the little dummy methods
around.  But that's not a big deal.  We could add some notation to the
doc string of these dummy functions so that the automatic property adder
doesn't mess with them.

  Ian



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to