We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58b95c8 commit 59f8ca9Copy full SHA for 59f8ca9
7 - mvc/mvc-after-strategy.py
@@ -1,5 +1,7 @@
1
import tkinter as tk
2
import uuid
3
+import string
4
+import random
5
from abc import ABC, abstractmethod
6
7
# functional strategy
@@ -9,6 +11,9 @@ def generate_uuid1():
9
11
def generate_uuid4():
10
12
return uuid.uuid4()
13
14
+def generate_simple_id():
15
+ return ''.join(random.choices(string.ascii_lowercase, k=30))
16
+
17
class Model:
18
def __init__(self):
19
self.uuid = []
@@ -81,5 +86,5 @@ def start_main_loop(self):
81
86
self.root.mainloop()
82
87
83
88
# create the MVC & start the application
84
-c = Controller(Model(), TkView(), generate_uuid4)
89
+c = Controller(Model(), TkView(), generate_simple_id)
85
90
c.start()
0 commit comments