1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2025-07-02 22:36:54 +02:00
Files
STARK/General/Identifable/UUID.py

14 lines
277 B
Python
Raw Normal View History

2022-04-14 22:57:55 +02:00
from typing import Optional
import uuid
class UUID(uuid.UUID):
def __new__(cls, string: Optional[str] = None):
if string:
return super().__new__(cls)
else:
return uuid.uuid1()
def __str__(self) -> str:
return self.hex