Changeset 4383 for waeup/branches/ulif-rewrite
- Timestamp:
- 28 Jun 2009, 00:02:27 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/university/certificate.txt
r4332 r4383 399 399 As we can see, the course was also removed from the certificate. 400 400 401 We can of course also remove existing courses from certificates by 402 using :meth:`delCourseRef`. This will not remove the same course from 403 any course container: 404 405 >>> mycourses = newdbroot['mydept'].courses 406 >>> mycert = newdbroot['mydept'].certificates['MYCERT'] 407 >>> mycourses.addCourse(mycourse) 408 >>> mycert.addCourseRef(mycourse) 409 >>> c1 = mycourses['MYCOURSE'] 410 >>> c2 = mycert['MYCOURSE'].course 411 >>> c1 is c2 412 True 413 414 >>> mycert.delCourseRef('MYCOURSE') 415 416 The certificate now has no ``MYCOURSE`` course anymore, while the 417 courses container still has: 418 419 >>> 'MYCOURSE' in mycert.keys() 420 False 421 422 >>> mycourses['MYCOURSE'] 423 <waeup.university.course.Course object at 0x...> 424 401 425 Clean up: 402 426
Note: See TracChangeset for help on using the changeset viewer.