Renamed directories to use them as modules

Literal: Allowed compare with None
This commit is contained in:
Oliver Hofmann 2025-04-22 19:36:59 +02:00
parent f0757f30fd
commit 78d4b25bd4
18 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,8 @@ class Literal:
def __eq__(self, other):
"""Vergleicht den Wert mit einem anderen Wert."""
if other is None:
return False
assert isinstance(other, Literal), "Can only compare with Literal or MemoryCell"
self.compare_count += 1
self.read_count += 1
@ -29,6 +31,8 @@ class Literal:
def __ne__(self, other):
"""Vergleicht den Wert der Speicherzelle mit einem anderen Wert."""
if other is None:
return True
assert isinstance(other, Literal), "Can only compare with Literal or MemoryCell"
self.compare_count += 1
self.read_count += 1

View File

@ -0,0 +1 @@
from vorlesung.L05_binaere_baeume.bin_tree import BinaryTree

View File

@ -1,4 +1,4 @@
from bin_tree_node import BinaryTreeNode
from vorlesung.L05_binaere_baeume.bin_tree_node import BinaryTreeNode
from utils.project_dir import get_path
from datetime import datetime

0
vorlesung/__init__.py Normal file
View File