Aliases for builtins in Python Joy.
This commit is contained in:
@@ -1028,6 +1028,26 @@ for F in (
|
||||
inscribe(F)
|
||||
|
||||
|
||||
for alias, name in (
|
||||
('+', 'add'),
|
||||
('-', 'sub'),
|
||||
('/', 'floordiv'),
|
||||
('%', 'mod'),
|
||||
('*', 'mul'),
|
||||
('>', 'gt'),
|
||||
('<', 'lt'),
|
||||
('>=', 'ge'),
|
||||
('<=', 'le'),
|
||||
('!=', 'ne'),
|
||||
('<>', 'ne'),
|
||||
('=', 'eq'),
|
||||
):
|
||||
try:
|
||||
_dictionary[alias] = _dictionary[name]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
'''
|
||||
██████╗ ███████╗███████╗██╗███╗ ██╗██╗████████╗██╗ ██████╗ ███╗ ██╗███████╗
|
||||
██╔══██╗██╔════╝██╔════╝██║████╗ ██║██║╚══██╔══╝██║██╔═══██╗████╗ ██║██╔════╝
|
||||
|
||||
Reference in New Issue
Block a user