This website works better with JavaScript.
Home
Help
Sign In
tmeissner
/
learning-by-doing
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
new internal method _set_id() to set global last_id attribute to the highest id found in actual notebook object
master
T. Meissner
10 years ago
parent
032fd0f884
commit
71f2e48751
1 changed files
with
8 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
python_3_oop/chapter02/notebook.py
+ 8
- 0
python_3_oop/chapter02/notebook.py
View File
@ -67,3 +67,11 @@ class Notebook:
return
note
return
note
return
None
return
None
def
_set_id
(
self
)
:
id
=
1
for
note
in
self
.
notes
:
if
note
.
id
>
id
:
id
=
note
.
id
global
last_id
last_id
=
id
Write
Preview
Loading…
Cancel
Save