cPickle.Pickler (Jython API documentation)
Date: 2012-08-13

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.python.modules
Class cPickle.Pickler

    java.lang.Object
      org.python.modules.cPickle.Pickler

Enclosing class:
  cPickle

    public static class cPickle.Pickler

extends Object

The Pickler object

See Also:
  `cPickle.Pickler(PyObject)`, `cPickle.Pickler(PyObject,int)`

Field Summary
`boolean` | `fast` The undocumented attribute fast of the C version of cPickle disables memoization.
`PyObject` | `inst_persistent_id` Hmm, not documented, perhaps it shouldn't be public?
`PyObject` | `persistent_id` To write references to persistent objects, the persistent module must assign a method to persistent_id which returns either None or the persistent ID of the object.

Constructor Summary
`cPickle.Pickler(PyObject file, int protocol)`

Method Summary
`void` | `dump(PyObject object)` Write a pickled representation of the object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fast

    public boolean fast

  The undocumented attribute fast of the C version of cPickle disables memoization. Since having memoization on won't break anything, having this dummy setter for fast here won't break any code expecting it to do something. However without it code that sets fast fails(ie test_cpickle.py), so it's worth having.

### persistent_id

    public PyObject persistent_id

  To write references to persistent objects, the persistent module must assign a method to persistent_id which returns either None or the persistent ID of the object. For the benefit of persistency modules written using pickle, it supports the notion of a reference to an object outside the pickled data stream. Such objects are referenced by a name, which is an arbitrary string of printable ASCII characters.

### inst_persistent_id

    public PyObject inst_persistent_id

  Hmm, not documented, perhaps it shouldn't be public? XXX: fixme.

Constructor Detail

### cPickle.Pickler

    public cPickle.Pickler(PyObject file,
                           int protocol)

Method Detail

### dump

    public void dump(PyObject object)

  Write a pickled representation of the object.

  Parameters:
    `object` - The object which will be pickled.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Jython homepage