[Biopython] SeqIO __init__.py typo ?

Peter Cock p.j.a.cock at googlemail.com
Thu Nov 13 00:30:38 UTC 2014


Hi Rad,

Good question, but no.

It is Python syntax for a "raw" string meaning things like \n
and \t are left as they are and not turned into a newline
or tab. We need to do this on a few of our docstrings (Python
documentation strings) due to wanting to use those special
strings in the examples in the text.

https://github.com/biopython/biopython/blob/master/Bio/SeqIO/__init__.py
https://docs.python.org/2.0/ref/strings.html

Peter

On Thu, Nov 13, 2014 at 9:08 AM, Radhouane Aniba <aradwen at gmail.com> wrote:

> Hello
>
> I was juste browsing the source to see how parse function is implemented
> and I found this before the docstring
>
> def parse(handle, format, alphabet=None):
>     r"""Turns a sequence file into an iterator returning SeqRecords.
>
>      - handle   - handle to the file, or the filename as a string
>                   (note older versions of Biopython only took a handle).
>      - format   - lower case string describing the file format.
>      - alphabet - optional Alphabet object, useful when the sequence type
>                   cannot be automatically inferred from the file itself
>                   (e.g. format="fasta" or "tab")
>
>     Typical usage, opening a file to read in, and looping over the record(s):
>
> there is an r before the """
>
> is that a typo ?
>
> Rad
> --
> *Radhouane Aniba*
> *Bioinformatics Scientist*
> *BC Cancer Agency, Vancouver, Canada*
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20141113/192ec4db/attachment.html>


More information about the Biopython mailing list