Skip to content

Tanya sh#92

Open
titatatia wants to merge 42 commits into
mainfrom
Tanya-SH
Open

Tanya sh#92
titatatia wants to merge 42 commits into
mainfrom
Tanya-SH

Conversation

@titatatia
Copy link
Copy Markdown
Collaborator

No description provided.

@titatatia
Copy link
Copy Markdown
Collaborator Author

Забыла кнопку нажать)

Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Хорошо. Но нужно оптимизировать (и кое-что исправить).

Comment thread Practice/tshyregena/алгоритм.py Outdated
Comment thread Practice/tshyregena/возврат.py Outdated
Comment thread Practice/tshyregena/декоратор.py
Comment thread Practice/tshyregena/игра.py Outdated
Comment thread Practice/tshyregena/матрица.py Outdated
Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Добавил ещё замечания!

Comment thread Practice/tshyregena/алгоритм.py Outdated
Comment thread Practice/tshyregena/возврат.py Outdated
Comment thread Practice/tshyregena/игра.py Outdated
Comment thread Practice/tshyregena/таб.py Outdated
Comment thread Practice/tshyregena/таб.py Outdated
Comment thread Practice/tshyregena/возврат.py
Comment thread Practice/tshyregena/декоратор.py Outdated
Comment thread Practice/tshyregena/матрица.py Outdated
Comment thread Practice/tshyregena/спящий парень.py Outdated
Comment thread Practice/tshyregena/спящий парень.py Outdated
Comment thread Practice/tshyregena/утки.py Outdated
@IlyaOrlov
Copy link
Copy Markdown
Owner

Принт - это НЕ аналог возврата. Принт - это вывод на экран.
Ретерн же - более универсальный механизм. Он позволяет использовать функцию в составе выражений, как в примере: x = fun1(3, 4) + 100
А ещё представьте, что Вы будет использовать функции len, replace, append, а они, кроме того, что будут выполнять свои основные предназначения, ещё на экран всякую информацию о своей работе выводить станут. Это так замусорит вывод, что в нём будет сложно разобраться, отличить свои выходные данные от служебных.

Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Осталось ещё по мелочи исправить.

Comment thread Practice/tshyregena/возврат.py
Comment thread Practice/tshyregena/таб.py
Comment thread Practice/tshyregena/матрица.py Outdated
Comment thread Practice/tshyregena/лекция_8/8.4.1.py
Comment thread Practice/tshyregena/лекция_8/генератор.py Outdated
Comment thread Practice/tshyregena/лекция_9/рабочие_дни.py Outdated
Comment thread Practice/tshyregena/лекция_9/рабочие_дни.py Outdated
Comment thread Practice/tshyregena/лекция_9/рабочие_дни.py Outdated
Comment thread Practice/tshyregena/лекция_9/рабочие_дни.py
@titatatia titatatia requested a review from IlyaOrlov November 14, 2023 16:30
Comment thread Practice/tshyregena/лекция_8/8.4.1.py
Comment thread Practice/tshyregena/лекция_8/генератор.py
Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Хорошо. Осталось 3 неисправленных замечания.

Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

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

Всё исправлено!
Остались вопросы только по (внезапно) pep8tasksh.py


class Shuffler:

def __init__(self, map): # Отсутствует параметр map
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

А почему этот параметр должен присутствовать?

def __init__(self, map): # Отсутствует параметр map
self.map = {}

def rename(self, dirname, output): # Может быть статическим методом
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Не может. Т.к. в его теле используется self.map

for path, mp3 in mp3s:
hashname = self.generate_name() + '.mp3'
self.map[hashname] = mp3
os.rename(path + '/' + mp3), path + '/' + hashname)) # Возможно ошибка в названии mp3
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

В названии mp3 нет ошибки.

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