Skip to content
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

Merged
merged 8 commits into from
Aug 30, 2021
Merged

Conversation

stalkermustang
Copy link
Collaborator

No description provided.

@SemyonSinchenko
Copy link
Collaborator

Мне нравится, круто!

Co-authored-by: vtrokhymenko <8581044+vtrokhymenko@users.noreply.github.com>
obj.energy += self.gamma * self.multiplier

class Object:
def __init__(self, energy = 10.0):
Copy link
Member

@vvssttkk vvssttkk Aug 29, 2021

Choose a reason for hiding this comment

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

хорошо бы на все ф-и добавить типизацию, а то где-то они есть, а где-то напрочь отсутствуют, как и на возвращение функций

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

я не стал добавлять везде чтобы не усложнять, так как там, например, есть пример ретерна такого же класса, то есть придется делать через строковый литерал, есть optional, придется объяснять что это итд. Думаешь, стоит добавить? Добавлял там, где менее очевидно и при этом не в нагрузку.

Copy link
Member

Choose a reason for hiding this comment

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

хм.. палка о 2х концах. давай оставим как есть, а там посмотрим: мб дадим как дом. мат. о типизации

stalkermustang and others added 2 commits August 29, 2021 14:28
Co-authored-by: vtrokhymenko <8581044+vtrokhymenko@users.noreply.github.com>
@vvssttkk
Copy link
Member

льем?

@vvssttkk vvssttkk merged commit d82b753 into master Aug 30, 2021
@vvssttkk vvssttkk deleted the stalkermustang-python-classes-lec10 branch August 30, 2021 18:35
Yorko added a commit that referenced this pull request Sep 7, 2021
Yorko added a commit that referenced this pull request Sep 7, 2021
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.

None yet

3 participants