Changeset - dd949a48669a
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-05-30 14:40:24
brettcsmith@brettcsmith.org
reports: Define RelatedPostings.__slots__.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/core.py
Show inline comments
...
 
@@ -157,12 +157,13 @@ class RelatedPostings(Sequence[data.Posting]):
 
    entirely up to the caller.
 

	
 
    A common pattern is to use this class with collections.defaultdict
 
    to organize postings based on some key. See the group_by_meta classmethod
 
    for an example.
 
    """
 
    __slots__ = ('_postings',)
 

	
 
    def __init__(self, source: Iterable[data.Posting]=()) -> None:
 
        self._postings: List[data.Posting] = list(source)
 

	
 
    @classmethod
 
    def group_by_meta(cls,
0 comments (0 inline, 0 general)