Skip to content

1. Смолянинов Станислав Александрович. 613 - #32

Open
BICSSA wants to merge 10 commits into
python-department:mainfrom
BICSSA:main
Open

BICSSA wants to merge 10 commits into
python-department:mainfrom
BICSSA:main

Conversation

@BICSSA

@BICSSA BICSSA commented Sep 25, 2026 •

Copy link
Copy Markdown
  1. Смолянинов Станислав Александрович. 613

@BICSSA BICSSA changed the title Task Completed 1. Смолянинов Станислав Александрович. 613 Oct 19, 2026
@github-actions github-actions Bot added the 613 label Oct 19, 2026
Comment thread src/part2/crud.py
"""
# TODO: реализуйте функцию
return 0
for i, product in enumerate(storage):

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

Comment thread src/part2/crud.py
index_modifiable_product = -1

for index in range(len(storage)):
if storage[index][NAME_INDEX] == fields[FIELDS_NAME_INDEX]:

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.

Лишняя ошибочная проверка на совпадение имени. Это же функция, которая применяется к уже существующей строке в базе данных.

Comment thread src/part3/utils.py
for product in storage:
row = "|"
for i in range(len(TABLE_HEADERS)):
row += (

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.

Можно было использовать f строки и было проще.
Пункт T8

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