Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Update tests.py #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mike-tishkovsky
Copy link

No description provided.

Copy link
Contributor

@wronglink wronglink left a 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 = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно не объявлять a = [], ведь в следующей строке происходит переопределение этого значения. Даже если там не найдется ни 1 элемента, то a примет значение пустого списка.

pass
def wrapper(arg1):
arg1 += 1
return arg1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот код всего-лишь возвращает значение, полученное снаружи и увеличивает его на 1. Необходимо добавить вызов декорируемой функции с увеличенным значением.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants