Repository: biopython/biopython

Issue:
A potential typo in SeqRecord
There is a  `__le___` method defined in the SeqRecord, with three trailing underscores instead of two. By any chance this is a typo?

https://github.com/biopython/biopython/blob/60b013cb81bedf671d5c77adcd4bfe3335482d3f/Bio/SeqRecord.py#L788


Discussion:
Yes that is a typo. I found a few more places in docstrings where a triple underscore was used instead of a double underscore.
Would you like to submit a pull request to fix this @zhuchcn?

Using a simple grep for "___" I found others, but as @mdehoon noted only in docstrings:

```
$ grep "___" */*.py Bio/*/*.py Bio/*/*/*.py
```
Sure, happy to! @peterjc 

Resolving patch:
diff --git a/Bio/SeqRecord.py b/Bio/SeqRecord.py
--- a/Bio/SeqRecord.py
+++ b/Bio/SeqRecord.py
@@ -604,7 +604,7 @@ def __contains__(self, char):
     def __str__(self):
         """Return a human readable summary of the record and its annotation (string).
 
-        The python built in function str works by calling the object's ___str__
+        The python built in function str works by calling the object's __str__
         method.  e.g.
 
         >>> from Bio.Seq import Seq
@@ -660,7 +660,7 @@ def __str__(self):
     def __repr__(self):
         """Return a concise summary of the record for debugging (string).
 
-        The python built in function repr works by calling the object's ___repr__
+        The python built in function repr works by calling the object's __repr__
         method.  e.g.
 
         >>> from Bio.Seq import Seq
@@ -785,7 +785,7 @@ def __lt__(self, other):
         """Define the less-than operand (not implemented)."""
         raise NotImplementedError(_NO_SEQRECORD_COMPARISON)
 
-    def __le___(self, other):
+    def __le__(self, other):
         """Define the less-than-or-equal-to operand (not implemented)."""
         raise NotImplementedError(_NO_SEQRECORD_COMPARISON)
 
diff --git a/Bio/phenotype/phen_micro.py b/Bio/phenotype/phen_micro.py
--- a/Bio/phenotype/phen_micro.py
+++ b/Bio/phenotype/phen_micro.py
@@ -551,7 +551,7 @@ def __repr__(self):
     def __str__(self):
         """Return a human readable summary of the record (string).
 
-        The python built in function str works by calling the object's ___str__
+        The python built in function str works by calling the object's __str__
         method.  e.g.
 
         >>> from Bio import phenotype
@@ -802,7 +802,7 @@ def __repr__(self):
     def __str__(self):
         """Return a human readable summary of the record (string).
 
-        The python built-in function str works by calling the object's ___str__
+        The python built-in function str works by calling the object's __str__
         method.  e.g.
 
         >>> from Bio import phenotype


Test patch:
diff --git a/Tests/test_SearchIO_model.py b/Tests/test_SearchIO_model.py
--- a/Tests/test_SearchIO_model.py
+++ b/Tests/test_SearchIO_model.py
@@ -1150,7 +1150,7 @@ def test_getitem(self):
         self.assertIs(self.frag2, self.hsp[1])
 
     def test_setitem_single(self):
-        """Test HSP.__setitem___, single item."""
+        """Test HSP.__setitem__, single item."""
         frag3 = HSPFragment("hit_id", "query_id", "AAA", "AAT")
         self.hsp[1] = frag3
         self.assertEqual(2, len(self.hsp))