-
Notifications
You must be signed in to change notification settings - Fork 10
Update tests.py #7
base: master
Are you sure you want to change the base?
Update tests.py #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Во втором задании ошибка, остальные решены хорошо.
def test_even_fucntion(): | ||
""" | ||
Необходимо реализовать функцию even_filter, которая получает неограниченное количество аргументов | ||
и возвращает из них только четные. | ||
""" | ||
|
||
def even_filter(*args): | ||
pass | ||
a = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно не объявлять a = []
, ведь в следующей строке происходит переопределение этого значения. Даже если там не найдется ни 1 элемента, то a
примет значение пустого списка.
homework/tests.py
Outdated
pass | ||
def wrapper(arg1): | ||
arg1 += 1 | ||
return arg1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот код всего-лишь возвращает значение, полученное снаружи и увеличивает его на 1. Необходимо добавить вызов декорируемой функции с увеличенным значением.
No description provided.