Updated slides
This commit is contained in:
@ -4,7 +4,7 @@ paginate: true
|
|||||||
class: invert
|
class: invert
|
||||||
# theme: uncover
|
# theme: uncover
|
||||||
footer: Tutorium 09 - 16.12.2023 - Nils Pukropp - https://s.narl.io/s/tutorium-09
|
footer: Tutorium 09 - 16.12.2023 - Nils Pukropp - https://s.narl.io/s/tutorium-09
|
||||||
header:
|
header:
|
||||||
---
|
---
|
||||||
|
|
||||||
# Tutorium 09
|
# Tutorium 09
|
||||||
@ -330,8 +330,8 @@ xs.internal_list # ????
|
|||||||
```python
|
```python
|
||||||
@dataclass
|
@dataclass
|
||||||
class MyList[T]:
|
class MyList[T]:
|
||||||
internal_list: InitVar[list[T]]
|
_internal_list: InitVar[list[T]]
|
||||||
length: InitVar[int]
|
_length: InitVar[int]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__internal_list = []
|
self.__internal_list = []
|
||||||
@ -353,8 +353,8 @@ class MyList[T]:
|
|||||||
```python
|
```python
|
||||||
@dataclass
|
@dataclass
|
||||||
class MyList[T]:
|
class MyList[T]:
|
||||||
internal_list: InitVar[list[T]]
|
_internal_list: InitVar[list[T]]
|
||||||
length: InitVar[int]
|
_length: InitVar[int]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__internal_list = []
|
self.__internal_list = []
|
||||||
@ -368,8 +368,8 @@ class MyList[T]:
|
|||||||
```python
|
```python
|
||||||
@dataclass
|
@dataclass
|
||||||
class MyList[T]:
|
class MyList[T]:
|
||||||
internal_list: InitVar[list[T]]
|
_internal_list: InitVar[list[T]]
|
||||||
length: InitVar[int]
|
_length: InitVar[int]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__internal_list = []
|
self.__internal_list = []
|
||||||
@ -392,7 +392,7 @@ class MyList[T]:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
class GameObject:
|
class GameObject:
|
||||||
position: InitVar[tuple[int, int]]
|
_position: InitVar[tuple[int, int]]
|
||||||
|
|
||||||
def __post__init__(self, position: tuple[int, int]):
|
def __post__init__(self, position: tuple[int, int]):
|
||||||
assert (0, 0) <= position
|
assert (0, 0) <= position
|
||||||
@ -410,7 +410,7 @@ class GameObject:
|
|||||||
```python
|
```python
|
||||||
@dataclass
|
@dataclass
|
||||||
class GameObject:
|
class GameObject:
|
||||||
position: InitVar[tuple[int, int]]
|
_position: InitVar[tuple[int, int]]
|
||||||
|
|
||||||
def __post_init__(self, position: tuple[int, int]):
|
def __post_init__(self, position: tuple[int, int]):
|
||||||
assert (0, 0) > position
|
assert (0, 0) > position
|
||||||
@ -511,4 +511,4 @@ Jetzt kann nichts beliebiges als `operator` übergeben werden
|
|||||||
|
|
||||||
- Abgabe: 18.12. - 09:00
|
- Abgabe: 18.12. - 09:00
|
||||||
- Testet euren Code!
|
- Testet euren Code!
|
||||||
- Es gibt keine dummen Fragen wenns ums Verständnis geht
|
- Es gibt keine dummen Fragen wenns ums Verständnis geht
|
||||||
|
Reference in New Issue
Block a user