From: Darren D. <dd...@co...> - 2006-03-22 19:24:12
|
On Wednesday 22 March 2006 09:49, Darren Dale wrote: > On Tuesday 21 March 2006 18:53, John Hunter wrote: > > >>>>> "Darren" == Darren Dale <dd...@co...> writes: > > > > Darren> The reason is that TextWithDash has a Text object > > Darren> attribute and delegates most of its methods to that object > > Darren> via __getattr__ and __setattr__. Can anyone tell me why > > Darren> this approach was favored over deriving TextWithDash from > > Darren> Text? > > > > I think __getattr__ and __setattr__ are mostly evil since they lead to > > hard to debug code and break things like tab completion in ipython and > > object inspection. I'm +1 for refactoring TextWiithDashes to use > > inheritance or otherwise expose the attributes directly. > > OK, I refactored TextWithDash, and my changes passed backend_driver.py. > setp(axes().get_yticklabels()) gives a comprehensive list as of svn 2206. > The old TextWithDash is still there, but masked, just in case. Strike that, John found a bug that was exposed by dashtick. I reverted back to the old behavior. |