psychopy/psychopy — pull request #375 by lindeloev (2013-08-21 11:34:39+00:00)
Title: More work on newstyle setters

Made newstyle setters work for the general parameters that apply to all stimuli: colors, colorSpaces, win, units and name. Later work will implement it for the stimulus-specific stuff like e.g. ImageStim.setImage. In the process several attributes can now be set not only at initialization but also at "runtime": win, units, colorSpace and name. A lot of redundant doc has now been moved to the parameter setters in _BaseVisualStim. A small thing: renamed val2array to _val2array as end users probably won't use it.

For the changelog, I suggest:
ENH: the syntax "stimulus.attribute [operation]= value" added for stim.color, stim.colorSpace, stim.win, stim.units, stim.name and for ShapeStim.lineColor, ShapeStim.lineColorSpace, ShapeStim.fillColor, ShapeStim.fillColorSpace.
ENH: on average around 33% speedup of initializing stimuli and changing attributes.
DOC: added code examples to several attributes in documentation.
RF: "behind the scenes" significant reduction of documentation redundancy. This makes it easier to maintain documentation.