A Python library that prevents defining female-related names in code
Project description
please_do_not_define
Python library that prevents you from defining variables, functions or classes with names that contain female-related terms. Now that a small number of women declare that they are undefinedable. The library will make sure that you won't offend them.
Installation
pip install please_do_not_define
Purpose
This library helps maintain gender-neutral naming in your Python code by detecting and blocking the use of female-related terms in variable, function, and class names.
Features
-
Scans Python code for names containing female-related terms
-
Blocks execution if prohibited names are found
-
Supports detection of both English and Chinese female-related terms
-
Works with various file encodings
Usage
Simply import the library in your Python script:
import please_do_not_define
The library will automatically scan your main script file when imported and raise a NameError if any prohibited names are found.
Prohibited Terms
The library checks for names containing any of the following terms (case insensitive):
- Chinese Terms:
女, 姑, 婆, 媳, 妇, 娘, 嬷, 姐, 妹, 嬢, 媛
- English Terms:
woman, women, girl, lady, Miss, Mrs, queen, female, she, her
Example
If your code contains:
def print_girl_name():
pass
The library will raise:
NameError: name 'print_girl_name' is illegal. Please don't try to define a female.
Note
This library is meant for educational or demonstration purposes regarding code naming conventions. Use responsibly and consider the context of your project's requirements.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file please_do_not_define-0.2.0.tar.gz.
File metadata
- Download URL: please_do_not_define-0.2.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75b09a5e1e5f2c9dc20034f13934bc0615e375f49819d765c2ba86b6130ede69
|
|
| MD5 |
629556b348528c9b0dd01c8cce071252
|
|
| BLAKE2b-256 |
269f7e1f3e602640e6d05fb4f0420a9bc7802f41252ac077d2e0e868f58562cc
|
File details
Details for the file please_do_not_define-0.2.0-py3-none-any.whl.
File metadata
- Download URL: please_do_not_define-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87af2d064e759ddb4307f92a1ef810ff08e80a65ca3bc2199983c9d50ca8b2be
|
|
| MD5 |
1b24678de670e8cb9ba1d7b26bfc43b4
|
|
| BLAKE2b-256 |
cccf9d9dcf48f04fdeb1cce0ce0dce66992d14022d12c34c50a59b5204bfc931
|