tut 12 corrections

This commit is contained in:
2024-01-19 04:50:13 +01:00
parent 5e531ce0c6
commit 89ad048474
2 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ def has_cycle(graph: Graph[Any]) -> bool:
- wir müssen unsere `.py` Datei ausführen bevor wir wissen ob alles korrekt ist - wir müssen unsere `.py` Datei ausführen bevor wir wissen ob alles korrekt ist
- **Pylance** ist ein eigenes Programm - **Pylance** ist ein eigenes Programm
- es soll beim Schreiben bereits **Typverletzungen** erkennen - es soll beim Schreiben bereits **Typverletzungen** erkennen
- **unvollständige** Typüberprüfung, soll nur den Programmierer unterstützen - **unvollständige** Typüberprüfung
--- ---
@ -332,8 +332,8 @@ def has_cycle(graph: Graph[Any]) -> bool:
x: int x: int
y: int y: int
def distance_from(self, other: 'Point') -> float: def distance_from(self, other: 'Point') -> float:
return math.sqrt((other.x - self.x) ** 2 + (other.y - self.y) ** 2) return math.sqrt((other.x - self.x) ** 2 + (other.y - self.y) ** 2)
``` ```
* `self` muss **nicht** Typannotiert werden, kann aber * `self` muss **nicht** Typannotiert werden, kann aber
* `other` hingegen schon, wegen Python muss in der Klasse mit `'` annotiert werden * `other` hingegen schon, wegen Python muss in der Klasse mit `'` annotiert werden

Binary file not shown.