Skip to content

[TASK 1] Python (https://github.com/SENATOROVAI/python/issues/1) - #607

Open
hasan613 wants to merge 2 commits into
SENATOROVAI:mainfrom
hasan613:python
Open

[TASK 1] Python (https://github.com/SENATOROVAI/python/issues/1)#607
hasan613 wants to merge 2 commits into
SENATOROVAI:mainfrom
hasan613:python

Conversation

@hasan613

Copy link
Copy Markdown
Member

Closes SENATOROVAI/python#1

@hasan613

Copy link
Copy Markdown
Member Author

Сабмичу, проверь пожалуйста

@hasan613
hasan613 requested a review from svetlana-s88 April 22, 2026 11:45
@ruslansenatorov

ruslansenatorov commented Apr 22, 2026

Copy link
Copy Markdown
Member
изображение

@hasan613

Copy link
Copy Markdown
Member Author

Исправил импорты

@ruslansenatorov

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d808b08a4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

del person

# убедимся, что такого словаря больше нет
person

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not read person after deleting it

When this chapter is executed top-to-bottom, this bare lookup runs immediately after del person, so it raises NameError and stops the lesson before the remaining dictionary sections execute. The earlier expected-error examples are commented out, so this should also be commented/wrapped or replaced with an explanatory note instead of an executable expression.

Useful? React with 👍 / 👎.

iterator_f = chain(["abc", "d", "e", "f"], "abc", [1, 2, 3])
print(iterator_f)

print(list(iterator))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the chain iterator in the chain example

In the chain() section this converts iterator, which is the list iterator created near the start of the chapter and already exhausted by previous next() calls/loops, so the example prints [] instead of showing the chained contents. Use iterator_f here (or recreate it) so the lesson demonstrates itertools.chain correctly.

Useful? React with 👍 / 👎.


# -

delayed_function_4 = logging(timer(delayed_function))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wrap the undecorated function in the equivalence example

This section just defined delayed_function_3 as the undecorated copy, but this line wraps delayed_function, which was already decorated with @timer earlier. That makes the manual form logging(timer(timer(original))), printing timing twice and no longer matching @logging @timer; use delayed_function_3 for the intended equivalence.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants