Skip to content

Commit

Permalink
Document all_records attribute of class LDIFRecordList
Browse files Browse the repository at this point in the history
The current documentation of this attribute was not displayed on the online doc.
  • Loading branch information
Alexandre Figura committed Dec 29, 2017
1 parent 7846ba1 commit b32bcaf
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Lib/ldif.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,29 +577,26 @@ def parse_change_records(self):

class LDIFRecordList(LDIFParser):
"""
Collect all records of LDIF input into a single list.
of 2-tuples (dn,entry). It can be a memory hog!
Collect all records of a LDIF file. It can be a memory hog!
Records are stored in :attr:`.all_records` as a single list
of 2-tuples (dn, entry), after calling :meth:`.parse`.
"""

def __init__(
self,
input_file,
ignored_attr_types=None,max_entries=0,process_url_schemes=None
):
"""
See LDIFParser.__init__()
Additional Parameters:
all_records
List instance for storing parsed records
"""
LDIFParser.__init__(self,input_file,ignored_attr_types,max_entries,process_url_schemes)

#: List storing parsed records.
self.all_records = []
self.all_modify_changes = []

def handle(self,dn,entry):
"""
Append single record to dictionary of all records.
Append a single record to the list of all records (:attr:`.all_records`).
"""
self.all_records.append((dn,entry))

Expand Down

0 comments on commit b32bcaf

Please sign in to comment.