Skip to content

Commit d8d39cb

Browse files
committed
updates
1 parent 67c5178 commit d8d39cb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

flyweight/flyweight_concept.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def __init__(self, code: int) -> None:
1616
class FlyweightFactory():
1717
"Creating the FlyweightFactory as a singleton"
1818

19-
_flyweights: dict[int, Flyweight]= {}
19+
_flyweights: dict[int, Flyweight] = {} # Python 3.9
20+
# _flyweights = {} # Python 3.8 or earlier
2021

2122
def __new__(cls):
2223
return cls

flyweight/flyweight_factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
class FlyweightFactory():
66
"Creating the FlyweightFactory as a singleton"
77

8-
_flyweights: dict[int, Flyweight] = {}
8+
_flyweights: dict[int, Flyweight] = {} # Python 3.9
9+
# _flyweights = {} # Python 3.8 or earlier
910

1011
def __new__(cls):
1112
return cls

0 commit comments

Comments
 (0)