-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python lec10 about OOP #147
Conversation
Мне нравится, круто! |
Co-authored-by: vtrokhymenko <8581044+vtrokhymenko@users.noreply.github.com>
obj.energy += self.gamma * self.multiplier | ||
|
||
class Object: | ||
def __init__(self, energy = 10.0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
хорошо бы на все ф-и добавить типизацию, а то где-то они есть, а где-то напрочь отсутствуют, как и на возвращение функций
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я не стал добавлять везде чтобы не усложнять, так как там, например, есть пример ретерна такого же класса, то есть придется делать через строковый литерал, есть optional, придется объяснять что это итд. Думаешь, стоит добавить? Добавлял там, где менее очевидно и при этом не в нагрузку.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
хм.. палка о 2х концах. давай оставим как есть, а там посмотрим: мб дадим как дом. мат. о типизации
Co-authored-by: vtrokhymenko <8581044+vtrokhymenko@users.noreply.github.com>
льем? |
No description provided.