
    XIg	                     V    d Z dgZd e       v r ed      dZ G d d      Z e       Zy)a@  
Module defining global singleton classes.

This module raises a RuntimeError if an attempt to reload it is made. In that
way the identities of the classes defined here are fixed and will remain so
even if duckdb spark itself is reloaded. In particular, a function like the following
will still work correctly after duckdb spark is reloaded:

    def foo(arg=pyducdkb.spark._NoValue):
        if arg is pyducdkb.spark._NoValue:
            ...

See gh-7844 for a discussion of the reload problem that motivated this module.

Note that this approach is taken after from NumPy.
_NoValue
_is_loadedz;Reloading duckdb.experimental.spark._globals is not allowedTc                   <     e Zd ZdZdZ fdZd ZeZd Zd Z	 xZ
S )_NoValueTypezSpecial keyword value.

    The instance of this class may be used as the default value assigned to a
    deprecated keyword in order to check if it has been given a user defined
    value.

    This class was copied from NumPy.
    Nc                 d    | j                   st        t        |   |       | _         | j                   S )N)_NoValueType__instancesuperr   __new__)cls	__class__s    _/var/www/html/answerous/venv/lib/python3.12/site-packages/duckdb/experimental/spark/_globals.pyr	   z_NoValueType.__new__9   s'    ~~"<=cBCN~~    c                      y)NF selfs    r   __nonzero__z_NoValueType.__nonzero__@   s    r   c                     | j                   dfS )Nr   r   r   s    r   
__reduce__z_NoValueType.__reduce__F   s    ##r   c                      y)Nz
<no value>r   r   s    r   __repr__z_NoValueType.__repr__I   s    r   )__name__
__module____qualname____doc__r   r	   r   __bool__r   r   __classcell__r   s   @r   r   r   -   s*     J H$r   r   N)r   __ALL__globalsRuntimeErrorr   r   r   r   r   r   <module>r!      sD   $" ,
 79
T
UU
 @ >r   