needs one line of code to decide whether the override is, in fact, in effect.
Suddenly dealing with parameters starts to be a full-time job, as every possible
setting has to be managed in every method. That's neither elegant nor scalable.
+Pretty soon we're in "just one more wafer-thin mint..." territory.
-Things get even worse if we want to change the default value for all shapes in the
-class. We have to rework every method that uses values, the ``__init__`` method,
-*et cetera*. We've entered "just one more wafer-thin mint..." territory.
+But with ``options``, it's easy. No matter how many configuration variables there
+are to be managed, each method needs just one line of code to manage them::
-But with ``options``, it's easy::
+ opts = self.options.push(kwargs)
+Changing things works simply and logically::
color='blue', width=10, name='one', height=10
blue', width=10, name='one', height=100
+ color='', width=10, name='one', height=100
color='yellow', width=10, name='one', height=44
-In one line, we reset the default for all ``Shape`` objects. (In typical usage
-we'd also define ``Shape.set()`` to transparently forward
-to ``Shape.options.set()`` for an even simpler resulting API.)
+In one line, we reset the default color for all ``Shape`` objects. That's
+visible in the next call to ``one.draw()``. Then we set the instance color
+of ``one`` (all other ``Shape`` instances remain blue). Finally, We call
+one with a temprary override of the color.
+A common pattern makes this even easier::
+ class Shape(OptionsClass):
+The ``OptionsClass`` base class will provide a ``set()`` method so that you
+don't need ``Shape.options.set()``. ``Shape.set()`` does the same thing,
+resulting in an even simpler API. The ``set()`` method is a "combomethod" that
+will take either a class or an instance and "do the right thing."
+``OptionsClass`` also provides a ``settings()`` method to easily handle
+transient ``with`` contexts (more on this in a minute).
The more options and settings a class has, the more unwieldy the
class and instance variable approach becomes, and the more desirable
if is_tall(one): # nope, not here!
-Full disclosure: Doing temporary settings took slightly more class
-setup code than is shown above. Four lines of code, to be precise.
+.. note:: If you don't wish to inherit from ``OptionsClass``, you can
+ manually add ``set()`` and ``settings()`` methods to your own class.
+ See the ``OptionsClass`` source code for details.
As one final feature, consider "magical" parameters. Add the following