
    Yi                     $   % S r SSKJrJrJrJr  \" S\S9r\" S\S9r " S S\\   5      r	\	" S5      r
\	S   \S	'    \	" S
5      r\	\   \S'    \	" S5      r\	\   \S'    \	" S5      r\	\   \S'    \	" S5      r\	\   \S'    \	" S5      r\	\   \S'   g)a  This module contains the DefaultValue class.

.. versionchanged:: 20.0
   Previously, the contents of this module were available through the (no longer existing)
   module ``telegram._utils.helpers``.

Warning:
    Contents of this module are intended to be used internally by the library and *not* by the
    user. Changes to this module are not considered breaking changes and may not be documented in
    the changelog.
    )GenericTypeVarUnionoverloadDVType)boundOTc                       \ rS rSrSrSrS\4S jrS\4S jr	S\
4S jrS\
4S	 jr\\S
SS\4S j5       5       r\\S
\S\4S j5       5       r\S
\\S4   S\4S j5       rSrg)DefaultValue$   a  Wrapper for immutable default arguments that allows to check, if the default value was set
explicitly. Usage::

    default_one = DefaultValue(1)
    def f(arg=default_one):
        if arg is default_one:
            print('`arg` is the default')
            arg = arg.value
        else:
            print('`arg` was set explicitly')
        print(f'`arg` = {str(arg)}')

This yields::

    >>> f()
    `arg` is the default
    `arg` = 1
    >>> f(1)
    `arg` was set explicitly
    `arg` = 1
    >>> f(2)
    `arg` was set explicitly
    `arg` = 2

Also allows to evaluate truthiness::

    default = DefaultValue(value)
    if default:
        ...

is equivalent to::

    default = DefaultValue(value)
    if value:
        ...

``repr(DefaultValue(value))`` returns ``repr(value)`` and ``str(DefaultValue(value))`` returns
``f'DefaultValue({value})'``.

Args:
    value (:class:`object`): The value of the default argument
Attributes:
    value (:class:`object`): The value of the default argument

valuer   c                     Xl         g Nr   )selfr   s     G/app/.venv/lib/python3.13/site-packages/telegram/_utils/defaultvalue.py__init__DefaultValue.__init__U   s    "
    returnc                 ,    [        U R                  5      $ r   )boolr   r   s    r   __bool__DefaultValue.__bool__X       DJJr   c                 "    SU R                    S3$ )NzDefaultValue()r   r   s    r   __str__DefaultValue.__str__\   s    tzzl!,,r   c                 ,    [        U R                  5      $ r   )reprr   r   s    r   __repr__DefaultValue.__repr__`   r   r   objzDefaultValue[OT]c                     g r    r%   s    r   	get_valueDefaultValue.get_valuec   s    25r   c                     g r   r'   r(   s    r   r)   r*   g   s    "%r   c                 H    [        U [        5      (       a  U R                  $ U $ )zShortcut for::

    return obj.value if isinstance(obj, DefaultValue) else obj

Args:
    obj (:obj:`object`): The object to process

Returns:
    Same type as input, or the value of the input: The value
)
isinstancer   r   r(   s    r   r)   r*   k   s     'sL99syyBsBr   N)__name__
__module____qualname____firstlineno____doc__	__slots__r   r   r   r   strr   r#   r   staticmethodr	   r)   r   __static_attributes__r'   r   r   r   r   $   s    ,\ I#f # $  - - #   5)5b5  5%r%b%  %CuR!334 C C Cr   r   NDEFAULT_NONEFDEFAULT_FALSETDEFAULT_TRUE   
DEFAULT_20z	127.0.0.1
DEFAULT_IPP   
DEFAULT_80)r2   typingr   r   r   r   objectr   r	   r   r7   __annotations__r8   r   r9   r;   intr<   r4   r>   r'   r   r   <module>rC      s   &
 5 4		(T SC76? SCl $0#5l4  5 0$0$7|D! 7 1#/#5l4  5 !-R 0
L 0 . ,[ 9
L 9
 !-R 0
L 0r   