Skip to content

User class updates base.json file instead of rewritting it#6

Open
sergeysablin99 wants to merge 1 commit into
notification-bot:Userfrom
sergeysablin99:user-with-updates
Open

User class updates base.json file instead of rewritting it#6
sergeysablin99 wants to merge 1 commit into
notification-bot:Userfrom
sergeysablin99:user-with-updates

Conversation

@sergeysablin99
Copy link
Copy Markdown
Contributor

Исправлена ошибка при инициализации класса UserList в случае пустого файла.
UserList теперь добавляет данные вместо перезаписывания

Copy link
Copy Markdown
Contributor

@exeynod exeynod 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 Python-bot/user.py
if old_users:
old_users = ast.literal_eval(old_users)
else:
old_users = dict()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Бесполезно, на сколько я знаю. Проверить на пустоту, и в случае того, что он пустой сделать его пустым

Comment thread Python-bot/user.py
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