| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/nltk/__pycache__/ |
Upload File : |
�
T�c� � �( � d Z dZ G d� d� � ZdS )a Helper to enable simple lazy module import.
'Lazy' means the actual import is deferred until an attribute is
requested from the module's namespace. This has the advantage of
allowing all imports to be done at the top of a script (in a
prominent and visible place) without having a great impact
on startup time.
Copyright (c) 1999-2005, Marc-Andre Lemburg; mailto:mal@lemburg.com
See the documentation for further information on copyrights,
or contact the author. All Rights Reserved.
� c �F � e Zd ZdZdZdZdZdZdZd
d�Z d� Z
d� Zd� Zd � Z
dS )�
LazyModulea� Lazy module class.
Lazy modules are imported into the given namespaces whenever a
non-special attribute (there are some attributes like __doc__
that class instances handle without calling __getattr__) is
requested. The module is then registered under the given name
in locals usually replacing the import wrapper instance. The
import itself is done using globals as global namespace.
Example of creating a lazy load module:
ISO = LazyModule('ISO',locals(),globals())
Later, requesting an attribute from ISO will load the module
automatically into the locals() namespace, overriding the
LazyModule instance:
t = ISO.Week(1998,1,1)
r � Nc � � || _ |�|}|| _ |� dd� � }|r|dz |z | _ || _ n|x| _ | _ d| _ dS )z�Create a LazyModule instance wrapping module name.
The module will later on be registered in locals under the
given module name.
globals is optional and defaults to locals.
N�__name__r �.� )�_LazyModule__lazymodule_locals�_LazyModule__lazymodule_globals�getr �_LazyModule__lazymodule_name�_LazyModule__lazymodule_init)�self�name�locals�globals�mainnames �1/usr/lib/python3/dist-packages/nltk/lazyimport.py�__init__zLazyModule.__init__? sq � � $*�� ��?��G�$+��!��;�;�z�2�.�.��� :�$�s�N�T�1�D�M�%)�D�"�"�59�9�D�M�D�2�!"����� c �L � | j }| j }| j r
| j | S t rt d|z � � t
|| j | j d� � x| j |<