Commit 32ed0799 authored by Mareš Martin's avatar Mareš Martin
Browse files

Objekty: Dotazy na typy

parent 1bc9ec1d
......@@ -213,6 +213,42 @@ Příšerka říká: Mňauuu
% ----------------------------------------------------------------------
\begin{frame}{Dotazy na typy}
\py{%
type(k) is Kocka
}{%
True
}
\py{%
type(k) is Zvire
}{%
False
}
\py{%
isinstance(k, Kocka)
}{%
True
}
\py{%
isinstance(k, Zvire)
}{%
True
}
\py{%
issubclass(Kocka, Zvire)
}{%
True
}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}{Jak to funguje uvnitř}
{\bf Prostory jmen (namespaces):}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment