Aliases for builtins in Python Joy.
This commit is contained in:
parent
178e58f8bd
commit
2700ab8a7f
|
|
@ -1028,6 +1028,26 @@ for F in (
|
||||||
inscribe(F)
|
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
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
██████╗ ███████╗███████╗██╗███╗ ██╗██╗████████╗██╗ ██████╗ ███╗ ██╗███████╗
|
██████╗ ███████╗███████╗██╗███╗ ██╗██╗████████╗██╗ ██████╗ ███╗ ██╗███████╗
|
||||||
██╔══██╗██╔════╝██╔════╝██║████╗ ██║██║╚══██╔══╝██║██╔═══██╗████╗ ██║██╔════╝
|
██╔══██╗██╔════╝██╔════╝██║████╗ ██║██║╚══██╔══╝██║██╔═══██╗████╗ ██║██╔════╝
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue