2. Motivation
One of the main reasons for using UUIDs is that no centralized
authority is required to administer them (although one format uses
IEEE 802 node identifiers, others do not). As a result, generation
on demand can be completely automated, and used for a variety of
purposes. The UUID generation algorithm described here supports very
high allocation rates of up to <b>10 million per second per machine</b> if
necessary, so that they could even be used as transaction IDs
import logging
# инициализируем логгер как нам надо
logger = logging.getLogger()
try:
variable = 1 / 0
except ZeroDivisionError:
logger.exception("ooops")
class Node(object):
def __init__(self, value, next_node=None):
self.next_node = next_node
self.value = value
def is_circular(self):
head, visited = self, set()
while head is not None:
i = id(head)
if i in visited:
return True
visited.add(i)
head = head.next_node
return False
x = 1.23999999
y = round(x, 4)
print("{0:0.4f}".format(y))