File: //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/docstring.pyo
�
�)�Uc @ sm d d l m Z d e f d � � YZ d e f d � � YZ d � Z d � Z e � Z d � Z d � Z d
S( i����( t cbookt Substitutionc B s8 e Z d Z d � Z d � Z d � Z e d � � Z RS( sO
A decorator to take a function's docstring and perform string
substitution on it.
This decorator should be robust even if func.__doc__ is None
(for example, if -OO was passed to the interpreter)
Usage: construct a docstring.Substitution with a sequence or
dictionary suitable for performing substitution; then
decorate a suitable function with the constructed object. e.g.
sub_author_name = Substitution(author='Jason')
@sub_author_name
def some_function(x):
"%(author)s wrote this function"
# note that some_function.__doc__ is now "Jason wrote this function"
One can also use positional arguments.
sub_first_last_names = Substitution('Edgar Allen', 'Poe')
@sub_first_last_names
def some_function(x):
"%s %s wrote the Raven"
c O s | p | | _ d S( N( t params( t selft argst kwargs( ( sG /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/docstring.pyt __init__ s c C s | j o | j | j | _ | S( N( t __doc__R ( R t func( ( sG /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/docstring.pyt __call__# s c O s | j j | | � d S( s= Assume self.params is a dict and update it with supplied argsN( R t update( R R R ( ( sG /opt/alt/python27/lib64/python2.7/site-packages/matplotlib/docstring.pyR
'