Panda3D
Classes
direct.showbase.Pool Namespace Reference

Classes

class  Pool
 

Detailed Description

Pool is a collection of python objects that you can checkin and
checkout. This is useful for a cache of objects that are expensive to load
and can be reused over and over, like splashes on cannonballs, or
bulletholes on walls. The pool is unsorted. Items do not have to be unique
or be the same type.

Internally the pool is implemented with 2 lists, free items and used items.

Example::

   p = Pool([1, 2, 3, 4, 5])
   x = p.checkout()
   p.checkin(x)