Skip to content

Commit

Permalink
Declaring Bio.mathfns, Bio.stringfns, Bio.listfns and their C impleme…
Browse files Browse the repository at this point in the history
…ntations as obsolete. Removing previously deprecated starts_with function from Bio.stringfns
  • Loading branch information
peterc committed Oct 29, 2008
1 parent db96eda commit 1255664
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
7 changes: 6 additions & 1 deletion Bio/listfns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""This provides useful general functions for working with lists.
"""This provides useful general functions for working with lists (OBSOLETE).
This module and its C code equivalent are considered to be obsolete, and
are likely to be deprecated in a future release of Biopython, before being
removed. Please get in touch via the mailing list if this will affect you.
Many of these functions can be avoided using the python set object.
Functions:
asdict Make the list into a dictionary (for fast testing of membership).
Expand Down
6 changes: 5 additions & 1 deletion Bio/mathfns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""This provides useful general math tools.
"""This provides useful general math tools (OBSOLETE).
This module and its C code equivalent are considered to be obsolete, and
are likely to be deprecated in a future release of Biopython, before being
removed. Please get in touch via the mailing list if this will affect you.
Functions:
fcmp Compare two floating point numbers, up to a specified precision.
Expand Down
16 changes: 5 additions & 11 deletions Bio/stringfns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""This provides useful general functions for working with strings.
"""This provides useful general functions for working with strings (OBSOLETE).
This module and its C code equivalent are considered to be obsolete, and
are likely to be deprecated in a future release of Biopython, before being
removed. Please get in touch via the mailing list if this will affect you.
Functions:
splitany Split a string using many delimiters.
Expand Down Expand Up @@ -70,16 +74,6 @@ def rfind_anychar(string, chars, index=None, negate=0):
# If not found, index will already be -1.
return index

def starts_with(s, start):
"""starts_with(s, start) -> 1/0
Return whether s begins with start.
"""
import warnings
warnings.warn("The starts_with function in Bio.stringfns was deprecated. Please use s.startswith(start) instead of starts_with(s, start)", DeprecationWarning)
return s.startswith(start)

# Try and load C implementations of functions. If I can't,
# then just ignore and use the pure python implementations.
try:
Expand Down
4 changes: 4 additions & 0 deletions DEPRECATED
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Bio.Transcribe and Bio.Translate
Declared obsolete in Release 1.49.
Please use the methods or functions in Bio.Seq instead.

Bio.mathfns, Bio.stringfns and Bio.listfns (and their C code variants)
==========================================
Declared obsolete in Release 1.49.

Bio.Ndb
=======
Deprecated in Release 1.49, as the website this parsed has been redesigned.
Expand Down

0 comments on commit 1255664

Please sign in to comment.