diff --git a/04-typing/04-typing.tex b/04-typing/04-typing.tex index 5fcbdc72ed4b1e65d14ee1fa124e358fca3fbf93..fa90ddf0d27fa37e5696a9df837418d169f6adf5 100644 --- a/04-typing/04-typing.tex +++ b/04-typing/04-typing.tex @@ -7,7 +7,7 @@ \title{Programování 2: Typové anotace} \author[Martin Mareš]{Martin Mareš\\\texttt{mj@ucw.cz}} \institute{Katedra Aplikované Matematiky\\MFF UK Praha} -\date{2021} +\date{2025} \setbeamersize{text margin left=5mm} \setbeamersize{text margin right=5mm} \begin{document} @@ -110,7 +110,7 @@ def g(seznam: List[str]) -> None: \smallskip -Parametrizovaný typ pro seznamy. +Parametrizovaný typ pro seznamy (nově funguje i {\tt list[str]}). ~ @@ -127,7 +127,7 @@ Buď {\bf int} nebo {\bf None} (též chybí-li parametr při volání). {\tt\color{blue} class Třída:\\ -~~~~def metoda(self, něco: int): +~~~~def metoda(self, něco: int) -> int: } \smallskip