Skip to main content

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 people of one gender 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

please_do_not_define-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

please_do_not_define-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file please_do_not_define-0.1.1.tar.gz.

File metadata

  • Download URL: please_do_not_define-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for please_do_not_define-0.1.1.tar.gz
Algorithm Hash digest
SHA256 39c2a57d14341c1ce16c3b697937909c9326991bfbc8dd1284c9612f71b42e54
MD5 8aecde8be00e6e6e59eb929a98bebde2
BLAKE2b-256 bc1b29c4250256778818b182023dffab91c62791b0167140d40170ca0d4fa373

See more details on using hashes here.

File details

Details for the file please_do_not_define-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for please_do_not_define-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b0a2226a23bc008ec8c7fde48159a728dd8663eb23d5576230cd0d5d5fe8984
MD5 b3d8f47bda60004f39149e38f7afe4c6
BLAKE2b-256 f1983bedd8a9936a74177802bf88844fc8174a2a884e682c80a5a4b2f81535ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page