Skip to content

Instantly share code, notes, and snippets.

View stephenmwilkins's full-sized avatar

Stephen Wilkins stephenmwilkins

View GitHub Profile
@stephenmwilkins
stephenmwilkins / british_english.py
Created May 14, 2024 06:12
Python decorator enabling use of British English named arguments
def enable_british_english(func):
"""
A simple decorator allowing users to provide British english
arguments to functions and methods.
Example:
@enable_british_english
def favourite(color=None):
print(f"my favourite colour is {color}")