Skip to content

2. Безымянный Сергей Андреевич. 613 - #114

Closed
wre7 wants to merge 1 commit into
python-department:mainfrom
wre7:Task-2-fix
Closed

wre7 wants to merge 1 commit into
python-department:mainfrom
wre7:Task-2-fix

Conversation

@wre7

@wre7 wre7 commented Oct 9, 2026

Copy link
Copy Markdown

No description provided.

@github-actions github-actions Bot added the 613 label Oct 9, 2026
@wre7 wre7 changed the title 2. Безымянный Сергей. 613 2. Безымянный Сергей Андреевич. 613 Oct 9, 2026
Comment thread src/part2/crud.py
product_id: int,
) -> Product | None:
for product in storage:
if product[PRODUCT_ID_INDEX] == product_id:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Цикл:

for index, product in enumerate(storage):
        if product[PRODUCT_ID_INDEX] == product_id:

встречается несколько раз, лучше было бы использовать везде read_product. Код был бы понятнее.
Пункт S1

@wre7 wre7 closed this Oct 27, 2026
@wre7
wre7 deleted the Task-2-fix branch October 27, 2026 09:34
@wre7
wre7 restored the Task-2-fix branch October 27, 2026 09:35
@wre7
wre7 deleted the Task-2-fix branch October 27, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants