Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
prm1
Commits
32ed0799
Commit
32ed0799
authored
Nov 25, 2019
by
Martin Mareš
Browse files
Objekty: Dotazy na typy
parent
1bc9ec1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
09-objekty/09-objekty.tex
View file @
32ed0799
...
...
@@ -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):
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment