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
fd469ed0
Commit
fd469ed0
authored
Nov 25, 2019
by
Martin Mareš
Browse files
Objekty: Další protokoly
parent
32ed0799
Changes
1
Hide whitespace changes
Inline
Side-by-side
09-objekty/09-objekty.tex
View file @
fd469ed0
...
...
@@ -167,7 +167,25 @@ True
\smallskip
Podobně jde předefinovat všechny operátory včetně
{
\bf
[]
}
a
{
\bf
.
}
Podobně jde předefinovat všechny operátory.
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}
{
Další protokoly
}
Další protokoly, které může třída implementovat:
\medskip
\begin{itemize}
\item
Konverze na bool, str, int, float
\item
Indexování: čtení/zápis/mazání
{
\it
obj
\/
}{
\bf
[...]
}
,
{
\bf
len(
}{
\it
obj
\/
}{
\bf
)
}
\item
Přístup k~atributům: čtení/zápis/mazání
{
\it
obj
\/
}{
\bf
.klíč
}
\item
Volání jako funkce
\item
Iterátor pro
{
\bf
for
}
{
\it
x
\/
}
{
\bf
in
}
{
\it
objekt
\/
}
\end{itemize}
\end{frame}
...
...
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