Created
February 26, 2018 15:26
-
-
Save pavelanni/20a4c089cbc6c80ace3a0520c870b13d to your computer and use it in GitHub Desktop.
Fun with decorators and Russian language in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
печать = 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