From 83d41f5e943c983a99dc2387fabc69ae0a70f931 Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Wed, 12 Mar 2025 09:41:41 +0100 Subject: [PATCH] Typing: Drobnosti --- 04-typing/04-typing.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/04-typing/04-typing.tex b/04-typing/04-typing.tex index 5fcbdc7..fa90ddf 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 -- GitLab