Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub-courses
python_one_week_4_biologists_solutions
Commits
e793fb48
Commit
e793fb48
authored
Feb 22, 2016
by
Bertrand NÉRON
Browse files
fix first exercice
parent
a2af841f
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/Architecture_and_design.rst
View file @
e793fb48
...
...
@@ -20,11 +20,11 @@ Create 2 classes
* Sequence
* MutableSequence
These 2 classes have same attributes but Sequence can be mutate and extend whereas Sequence are immutable.
These 2 classes have same attributes but
Mutable
Sequence can be mutate and extend whereas Sequence are immutable.
example of code using these classes: ::
>>> eco = Sequence('toto' , 'GAATTC')
>>> eco =
Mutable
Sequence('toto' , 'GAATTC')
>>> eco.mutate(1, 'T')
>>> eco.sequence
'GTATTC'
...
...
@@ -46,7 +46,7 @@ how can you modeling
* non mutable amino acid sequence
* mutable amino acid sequence
can you easily extend your model to support no mutable/ mutable RNA sequence ?
**bonus**:
can you easily extend your model to support no mutable/ mutable RNA sequence ?
.. literalinclude:: _static/code/multi_inheritance.py
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment