Skip to content

create hw with classes#11

Open
ipsemenov wants to merge 1 commit into
mainfrom
classes
Open

create hw with classes#11
ipsemenov wants to merge 1 commit into
mainfrom
classes

Conversation

@ipsemenov
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@krglkvrmn krglkvrmn left a comment

Choose a reason for hiding this comment

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

Хорошая работа, +1 балл за список зависимостей

Comment thread hw8/code/classes.py
class RNA:

def __init__(self, rna):
self.rna = Seq(rna)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

image
Нужны проверки на алфавит, иначе Seq съест почти что угодно

Comment thread hw8/code/classes.py
Comment on lines +59 to +60
self.positive_numbers = [arg for arg in args if isinstance(arg, (int, float)) and arg > 0]
super().__init__(self.positive_numbers)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Записывать это в атрибут не нужно

Suggested change
self.positive_numbers = [arg for arg in args if isinstance(arg, (int, float)) and arg > 0]
super().__init__(self.positive_numbers)
positive_numbers = [arg for arg in args if isinstance(arg, (int, float)) and arg > 0]
super().__init__(positive_numbers)

Comment thread hw8/code/classes.py
Comment on lines +105 to +106
with open(self.path) as f:
for record in SeqIO.parse(f, "fasta"):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ты считываешь данные в каждой функции. Наверное, лучше выделить это в отдельный метод и считать всё один раз в конструкторе

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