Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Mar 8, 2021
1 parent e190cfe commit 865eb2f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions aiomisc/cache/lfu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
from typing import Any, Hashable, Optional, Set


@dataclass(unsafe_hash=True)
class Node:
prev: Optional["Node"]
next: Optional["Node"]
items: Set["Item"]
__slots__ = ('prev', 'next', 'items')

def __init__(self, prev: "Node" = None, next: "Node" = None,
items: Optional[Set["Item"]] = None):
self.prev = prev
self.next = next
self.items = items or set()


@dataclass(frozen=True)
Expand Down

0 comments on commit 865eb2f

Please sign in to comment.