Skip to content
Snippets Groups Projects
Commit 32ed0799 authored by Martin Mareš's avatar Martin Mareš
Browse files

Objekty: Dotazy na typy

parent 1bc9ec1d
No related branches found
No related tags found
No related merge requests found
......@@ -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):}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment