From: Benjamin R. <ben...@ou...> - 2013-01-16 20:24:05
|
On Wed, Jan 16, 2013 at 3:05 PM, Todd <tod...@gm...> wrote: > On Wed, Jan 16, 2013 at 2:55 PM, Benjamin Root <ben...@ou...> wrote: > >> >> On Wed, Jan 16, 2013 at 2:42 PM, Todd <tod...@gm...> wrote: >> >>> Currently matplotlib uses set_ and get_ functions for reading and >>> writing values. However, since 2.6 python supports properties, which allow >>> access to such values as attributes in addition to using the functions >>> directly. Would it be worthwhile implementing property support in >>> matplotlib? >>> >>> >> This was actually discussed during a Birds of a Feather (BOF) meeting >> back in SciPy2012 (which John Hunter attended). I am definitely for the >> idea, but it is going to be a very painful and long deprecation process. >> >> Is there a reason we have to deprecate the current method? They are not > mutually-exclusive. > > But, then what is the gain of switching to the properties approach? Properties allows you to clean up one's API, and also enables code-execution upon get/sets. We don't really have much of a need for the latter, except in a few places. I would see a move to properties as a way to clean up our API back to the just the getp() setp() approach for portability with matlab. Note, I am a fan of moving to properties, but all of this will have to be thought-out. Ben Root |