OwlCyberSecurity - MANAGER
Edit File: docstring.cpython-38.pyc
U ��]� � @ s� d dl Z d dlmZ G dd� de�Ze�d�G dd� de��Zejddd �d d� �Zdd � Ze� Z dd� Z ejddd �dd� �ZdS )� N)�cbookc @ s4 e Zd ZdZdd� Zdd� Zdd� Zedd � �Zd S )�SubstitutionaG A decorator that performs %-substitution on an object's docstring. This decorator should be robust even if ``obj.__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 |r|rt d��|p|| _d S )Nz+Only positional or keyword args are allowed)� TypeError�params��self�args�kwargs� r �6/usr/lib/python3/dist-packages/matplotlib/docstring.py�__init__! s zSubstitution.__init__c C s |j r| j | j; _ |S �N)�__doc__r )r �funcr r r �__call__&