Skip to content

Instantly share code, notes, and snippets.

@pavelanni
Created February 26, 2018 15:26
Show Gist options
  • Save pavelanni/20a4c089cbc6c80ace3a0520c870b13d to your computer and use it in GitHub Desktop.
Save pavelanni/20a4c089cbc6c80ace3a0520c870b13d to your computer and use it in GitHub Desktop.
Fun with decorators and Russian language in Python
печать = print
def пожалуйста(func):
def wrapper():
func()
печать(', пожалуйста ', end='')
return wrapper
def ввод1():
печать('Нажмите любую клавишу', end='')
def ввод2():
печать('Введите своё имя', end='')
@пожалуйста
def ввод3():
печать('Загадайте число', end='')
ввод1()
печать('\n')
ввод2()
печать('\n')
ввод3()
печать('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment