File: //lib/python3/dist-packages/twisted/python/__pycache__/usage.cpython-310.pyc
o
�b� � @ sd d Z ddlZddlZddlZddlZddlZddlmZ ddlmZm Z ddl
mZmZ G dd� de
�ZeZG dd � d �ZG d
d� de�ZdZd
ZG dd� d�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG d d!� d!e�ZG d"d#� d#�Zd,d%d&�Z d-d'd(�Z!d)d*� Z"d+e"_#dS ).a
twisted.python.usage is a module for parsing/handling the
command line of your program.
For information on how to use it, see
U{http://twistedmatrix.com/projects/core/documentation/howto/options.html},
or doc/core/howto/options.xhtml in your Twisted directory.
� N)�path)�Optional�cast)�reflect�utilc @ s e Zd ZdS )�
UsageErrorN)�__name__�
__module__�__qualname__� r r �6/usr/lib/python3/dist-packages/twisted/python/usage.pyr s r c @ � e Zd ZdZdd� Zdd� ZdS )�CoerceParameterzE
Utility class that can corce a parameter before storing it.
c C s || _ || _t| jdd�| _dS )zq
@param options: parent Options object
@param coerce: callable used to coerce the value.
� coerceDoc� N)�options�coerce�getattr�doc)�selfr r r r r �__init__* s zCoerceParameter.__init__c
C s^ |du rt d|� d���z| �|�}W n ty& } zt d|� ���d}~ww || jj|<