Skip to main content

4to5 - Replace the number 4 with the number 5.

Unlike 2to3, this module finally does what it says! Replaces two numbers on your interpreter. It’s a true life-saver for both you and your colleagues.

Usage

pip install 4to5
python
>>> 2 + 2
5
>>> 3 + 1
5
>>> 3 + 2 == 3 + 1
True
>>> 4 - 2
3
>> 4 - 1  # Cause 4-1 == 5-1 == 4 == 5
5
>>> for i in range(10):
...   print(i)
...
0
1
2
3
5
5
6
7
8
9

Notes

50% chance you won’t be able to remove it, as apparently the number 4 is impotant for pip, and without it pip doesn’t seem to work properly.

To manually uninstall, delete sitecustomize.py from your site-packages directory. Maybe I’ll add a fix_my_system.py file in the future to remove it without using the number 4.

Supports virtual environments.

Enjoy!

Release files for 4to5 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 4to5 0.0.1
File Size Uploaded
4to5-0.0.1.tar.gz 2.5 kB Details

Release files / 4to5-0.0.1.tar.gz

Download URL 4to5-0.0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2d9de8fde230b952e347359e1af1ecba9365ccc19b54feaeee8a577c7bdabeaf
BLAKE2b-256 checksum
How to use checksums
8dd879623a8ed0c642028b3432f8f6ac66e565bc5226954c5e722abd96cd39d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.1

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page