Skip to main content

oldenglish

Changes python default names to old ones.

Original Custom Type
print publish function
input hark function
help aid function
.count() reckon() function
.find() seek() function
.replace() exchge() function
if an it be keyword (via hook)
else otherwise keyword (via hook)
def decree keyword (via hook)

Function renames

These just work, no setup needed:

from oldenglish import publish, hark, aid, reckon, seek, exchge

publish("hello")
name = hark("what's your name? ")
aid(str)
reckon("abcabc", "a")        # like "abcabc".count("a")
seek("abcabc", "b")          # like "abcabc".find("b")
exchge("hi", "hi", "bye")    # like "hi".replace("hi", "bye")

Keyword renames

if/else/def are actual reserved words, so you can't just alias them. Instead, write your code in a file ending in .oe.py and this package will rewrite it into real Python before it's compiled:

# main.oe.py
from oldenglish import publish

decree greet(name):
    an it be name == "world":
        publish("hello world")
    otherwise:
        publish("hello " + name)

greet("world")

Then from a normal .py file:

import oldenglish
oldenglish.enable_keywords()

import main  # loads main.oe.py

License

MIT, see LICENSE.

Download files

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

Source Distribution

oldenglish-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

oldenglish-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file oldenglish-0.1.0.tar.gz.

File metadata

  • Download URL: oldenglish-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oldenglish-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00f3e5f4697d58590f859533dd80be9c8e216ab92685514cf04e6a134b157dff
MD5 e44c3d305950538db68a50176d553a0d
BLAKE2b-256 898ac2c615d28c81931640e2ca811ea80ed3da3923b2ed8000cc2f0b5acf6923

See more details on using hashes here.

File details

Details for the file oldenglish-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oldenglish-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oldenglish-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 424a1ad23ce4d5470d75432afc00ab9f85e04c7a6b1d948557ccf9282ad75a1d
MD5 797fe5c722b0bae06dcfcb46135e5077
BLAKE2b-256 961b05ba19b14214e93ad5cb8adb0b475394d396815726bf9a7185a046498f80

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