Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Python references and solutions to reference problems

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
548 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 25, 2008

Dr. Tim Couper

The talk gives a clear presentation of:




* Reference counting (sys.getrefcount and how it works)
* Circular references (gc.collect as a means of finding them)
* Weak references (weakref.ref as a means of resolution)
* Pickling classes with weak references (cPickle/pickle module, __getstate__, __setstate__)




Along the way, we'll introduce a couple of interesting patterns which can be used to solve common classes of circular reference problems. As a side-benefit, the patterns demonstrate the clean and practical uses of properties and mixin classes (how to make a pickleable, circular-reference-free subclass of a pickleable, circular-reference-strapped class), and, of course, use the unittest framework to check that our classes always stays circular-reference-free.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (1)

Sign In or Sign Up now to post a comment!
  • Do the slides exist for this one, somewhere, because you really need them...

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more