Commit c7596a7f authored by Martin Larralde's avatar Martin Larralde
Browse files

Add a docstring to the `Peptide.__init__` method

parent fca128e4
......@@ -118,6 +118,13 @@ class ZScales(typing.NamedTuple):
class Peptide(typing.Sequence[str]):
"""A sequence of amino acids.
Attributes:
sequence (`str`): The peptide primary sequence, encoded in the IUPAC
one-letter code.
"""
# --- Class constants ----------------------------------------------------
......@@ -196,6 +203,15 @@ class Peptide(typing.Sequence[str]):
# --- Magic methods ------------------------------------------------------
def __init__(self, sequence: str) -> None:
"""Create a new peptide object with the given sequence.
Arguments:
sequence (`str`): A sequence of amino acids encoded with the
IUPAC one-letter code. Non-standard (*B*, *Z*, *J*) and
unknown (*X*) residues are supported in some methods, but
not all of them.
"""
self.sequence: str = sequence
def __len__(self) -> int:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment