[TASK 1] Python (https://github.com/SENATOROVAI/python/issues/1) - #607
[TASK 1] Python (https://github.com/SENATOROVAI/python/issues/1)#607hasan613 wants to merge 2 commits into
Conversation
Closes SENATOROVAI/python#1
|
Сабмичу, проверь пожалуйста |
|
Исправил импорты |
|
@codex review |
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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 👍 / 👎.

Closes SENATOROVAI/python#1