| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pandas/_config/__pycache__/ |
Upload File : |
�
1 �gF � �� � d Z ddlmZ ddlmZ ddlZddlZddlZddlZddl m
Z
ddlmZ e
rddl
mZ eej f dd�� Zej fd
d �Zdd
�Z d dd�Zy)zx
Helpers for configuring locale settings.
Name `localization` is chosen to avoid overlap with builtin `locale` module.
� )�annotations)�contextmanagerN)�
TYPE_CHECKING)�options)� Generatorc # � K � t j |� } t j || � t j � \ }}|�|�
|� d|� ��� n| �� t j ||� y# t j ||� w xY w�w)aE
Context manager for temporarily setting a locale.
Parameters
----------
new_locale : str or tuple
A string of the form <language_country>.<encoding>. For example to set
the current locale to US English with a UTF8 encoding, you would pass
"en_US.UTF-8".
lc_var : int, default `locale.LC_ALL`
The category of the locale being set.
Notes
-----
This is useful when you want to run a particular block of code under a
particular locale, without globally setting the locale. This probably isn't
thread-safe.
N�.)�locale� setlocale� getlocale)�
new_locale�lc_var�current_locale�normalized_code�normalized_encodings �=C:\Python312\Lib\site-packages\pandas/_config/localization.py�
set_localer s� � �� �. �%�%�f�-�N�1������,�/5�/?�/?�/A�,��,��&�+>�+J�$�%�Q�':�&;�<�<��������0�������0�s �B
�?A/ �B
�/B�B
c � � t | |�� 5 ddd� y# 1 sw Y yxY w# t t j f$ r Y yw xY w)aj
Check to see if we can set a locale, and subsequently get the locale,
without raising an Exception.
Parameters
----------
lc : str
The locale to attempt to set.
lc_var : int, default `locale.LC_ALL`
The category of the locale being set.
Returns
-------
bool
Whether the passed locale can be set
)r NTF)r �
ValueErrorr
�Error)�lcr s r �can_set_localer 9 sJ � �"�
��6�
*� �� � �
� ��
����%� ���s# �
&