Skip to content

Commit

Permalink
Removed Bio.SCOP.Dom.Iterator, which was deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoon committed Nov 5, 2010
1 parent dd2d463 commit 5af7ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
33 changes: 0 additions & 33 deletions Bio/SCOP/Dom.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -76,36 +76,3 @@ def parse(handle):
if line.startswith('#'): if line.startswith('#'):
continue continue
yield Record(line) yield Record(line)


class Iterator:
"""Iterates over a DOM file.
"""
def __init__(self, handle, parser=None):
"""Create an object that iterates over a DES file.
handle -- file-like object.
parser -- an optional Parser object to change the results into
another form. If set to None, then the raw contents
of the file will be returned.
"""
import warnings
import Bio
warnings.warn("Bio.SCOP.Dom.Iterator is deprecated. Please use Bio.SCOP.Dom.parse() instead.", Bio.BiopythonDeprecationWarning)
from types import FileType, InstanceType
if type(handle) is not FileType and type(handle) is not InstanceType:
raise ValueError("I expected a file handle or file-like object")
self._handle = handle
self._parser = parser

def next(self):
line = self._handle.readline()
if not line:
return None
if line.startswith('#'):
return self.next()
if self._parser is not None:
return self._parser.parse(line)
return line
4 changes: 2 additions & 2 deletions DEPRECATED
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ Release 1.53.
Bio.SCOP Bio.SCOP
======== ========
The module Bio.SCOP.FileIndex was deprecated in Release 1.46, and removed in The module Bio.SCOP.FileIndex was deprecated in Release 1.46, and removed in
Release 1.53. The class Parser in Bio.SCOP.DOM was removed in Release 1.55 Release 1.53. The class Parser in Bio.SCOP.Dom was removed in Release 1.55
final. final. The class Iterator in Bio.SCOP.Dom was removed in Release 1.56.


Bio.utils Bio.utils
========= =========
Expand Down

0 comments on commit 5af7ecc

Please sign in to comment.