[Jython-checkins] jython (merge default -> default): Merge.

frank.wierzbicki jython-checkins at python.org
Tue Apr 10 20:38:09 CEST 2012


http://hg.python.org/jython/rev/f15da0d415db
changeset:   6555:f15da0d415db
parent:      6554:c8b6eeb51a2a
parent:      6553:7e02da147bb9
user:        Frank Wierzbicki <fwierzbicki at gmail.com>
date:        Tue Apr 10 11:37:43 2012 -0700
summary:
  Merge.

files:
  CoreExposed.includes                            |     1 +
  Misc/make_pydocs.py                             |     1 +
  src/org/python/core/BaseBytes.java              |  1044 +
  src/org/python/core/BuiltinDocs.java            |  8633 +++++----
  src/org/python/core/PyByteArray.java            |  1358 +
  src/org/python/core/PyByteArrayDerived.java     |  1116 +
  src/org/python/core/__builtin__.java            |     1 +
  src/templates/bytearray.derived                 |     4 +
  src/templates/mappings                          |     1 +
  tests/java/org/python/core/BaseBytesTest.java   |   927 +
  tests/java/org/python/core/PyByteArrayTest.java |  1061 +
  11 files changed, 10032 insertions(+), 4115 deletions(-)


diff --git a/CoreExposed.includes b/CoreExposed.includes
--- a/CoreExposed.includes
+++ b/CoreExposed.includes
@@ -5,6 +5,7 @@
 org/python/core/PyBaseException.class
 org/python/core/PyBoolean.class
 org/python/core/PyBuiltinCallable.class
+org/python/core/PyByteArray.class
 org/python/core/PyCell.class
 org/python/core/PyClass.class
 org/python/core/PyClassMethod.class
diff --git a/Misc/make_pydocs.py b/Misc/make_pydocs.py
--- a/Misc/make_pydocs.py
+++ b/Misc/make_pydocs.py
@@ -60,6 +60,7 @@
 set,
 frozenset,
 BaseException,
+bytearray,
 #buffer,
 # +
 type(f),
diff --git a/src/org/python/core/BaseBytes.java b/src/org/python/core/BaseBytes.java
new file mode 100644
--- /dev/null
+++ b/src/org/python/core/BaseBytes.java
@@ -0,0 +1,1044 @@
+package org.python.core;
+
+import java.util.AbstractList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+/**
+ * Base class for Jython bytearray (and bytes in due course) that provides most of the Java API,
+ * including Java List behaviour. Attempts to modify the contents through this API will throw
+ * a TypeError if the actual type of the object is not mutable.
+ * <p>
+ * It is possible for a Java client to treat this class as a <tt>List&lt;PyInteger></tt>,
+ * obtaining equivalent functionality to the Python interface in a Java paradigm.
+ * The reason 
+ * {@link }
+ * <p>Subclasses must define (from {@link PySequence}): <ul>
+ * <li>{@link #getslice(int, int, int)}</li>
+ * <li>{@link #repeat(int)}</li>
+ * </ul>each returning an appropriate concrete type. Mutable subclasses should override:<ul>
+ * <li>{@link #pyset(int, PyObject)}</li>
+ * <li>{@link #setslice(int, int, int, PyObject)}</li>
+ * <li>{@link #del(int)}</li>
+ * <li>{@link #delRange(int, int)}</li>
+ * </ul> 
+ * since the default implementations will otherwise throw an exception.
+ */
+public abstract class BaseBytes extends PySequence implements MemoryViewProtocol, List<PyInteger> {
+    
+    /**
+     * Simple constructor of empty zero-length array of defined type.
+     * @param type explicit Jython type
+     */
+    public BaseBytes(PyType type) {
+        super(type);            // implicit setStorage( emptyStorage );
+        setStorage(emptyStorage);
+    }
+
+    /**
+     * Simple constructor of zero-filled array of defined size and type.
+     * @param size required
+     * @param type explicit Jython type
+     */
+    public BaseBytes(PyType type, int size) {
+        super(type);
+        newStorage( size );
+    }
+
+    /**
+     * Construct byte array of defined type by copying values from int[].
+     * 
+     * @param type explicit Jython type
+     * @param value source of values (and size)
+     */
+    public BaseBytes(PyType type, int[] value) {
+        super(type);
+        int n = value.length;
+        newStorage(n);
+        for (int i = offset, j = 0; j < n; i++, j++)      // Note offset may be non-zero
+            storage[i] = byteCheck(value[j]);
+    }
+
+    /**
+     * Construct byte array of defined type by copying character values from a String. These values
+     * have to be in the Python byte range 0 to 255.
+     * 
+     * @param type explicit Jython type
+     * @param value source of characters
+     * @throws PyException if any value[i] > 255
+     */
+    protected BaseBytes(PyType type, String value) throws PyException {
+        super(type);
+        int n = value.length();
+        newStorage(n);
+        int i = offset + size;
+        while (n > 0)
+            storage[--i] = byteCheck(value.charAt(--n));
+    }   
+    
+    /**
+     * Helper for constructors and methods that manipulate the storage in mutable subclasses. It
+     * also permits shared storage between objects, which in general is unsafe if the storage is
+     * subject to modification independent of the object now being created. Immutable types may
+     * share storage (safely).
+     * 
+     * @param storage byte array allocated by client
+     * @param size number of bytes actually used
+     * @param offset index of first byte used
+     * @throws IllegalArgumentException if the range [offset:offset+size] is not within the array
+     *             bounds of storage or size<0.
+     */
+    protected void setStorage(byte[] storage, int size, int offset) throws IllegalArgumentException {
+        if (size < 0 || offset < 0 || offset + size > storage.length) {
+            throw new IllegalArgumentException();
+        } else {
+            this.storage = storage;
+            this.size = size;
+            this.offset = offset;
+        }
+    }
+
+    /**
+     * Helper for constructors and methods that manipulate the storage in mutable subclassesin the
+     * case where the storage should consist of the first part of the given array.
+     * 
+     * @param storage byte array allocated by client
+     * @param size number of bytes actually used
+     * @throws IllegalArgumentException if the range [0:size] is not within the array bounds of
+     *             storage.
+     */
+    protected void setStorage(byte[] storage, int size) throws IllegalArgumentException {
+        if (size < 0 || size > storage.length) {
+            throw new IllegalArgumentException();
+        } else {
+            this.storage = storage;
+            this.size = size;
+            this.offset = 0;
+        }
+    }
+
+    /**
+     * Helper for constructors and methods that manipulate the storage in mutable subclasses in the
+     * case where the storage should consist of exactly the whole of the given array.
+     * 
+     * @param storage byte array allocated by client
+     */
+    protected void setStorage(byte[] storage) {
+        this.storage = storage;
+        this.size = storage.length;
+        this.offset = 0;
+    }
+
+
+    /*
+     * ========================================================================================
+     * Support for memoryview
+     * ========================================================================================
+     * 
+     * This is present in order to facilitate development of PyMemoryView which a full
+     * implementation of bytearray would depend on, while at the same time a full implementation of
+     * memoryview depends on bytearray.
+     */
+    /**
+     * Get hold of a <code>memoryview</code> on the current byte array.
+     * @see MemoryViewProtocol#getMemoryView()
+     */
+    @Override
+    public MemoryView getMemoryView() {
+        if (mv == null) mv = new MemoryViewImpl();
+        return mv;
+    }
+
+    private MemoryView mv;
+
+    /**
+     * All instances of BaseBytes have one dimension with stride one.
+     */
+    private static final PyTuple STRIDES = new PyTuple(Py.One);
+
+    /**
+     * Very simple MemoryView for one-dimensional byte array. This lacks any actual access to the
+     * underlying storage as the interface is not presently defined.
+     */
+    private class MemoryViewImpl implements MemoryView {
+
+        private final PyTuple SHAPE = new PyTuple(new PyInteger(storage.length));
+
+        @Override
+        public String get_format() {
+            return "B";
+        }
+
+        @Override
+        public int get_itemsize() {
+            return 1;
+        }
+
+        @Override
+        public PyTuple get_shape() {
+            return SHAPE;
+        }
+
+        @Override
+        public int get_ndim() {
+            return 1;
+        }
+
+        @Override
+        public PyTuple get_strides() {
+            return STRIDES;
+        }
+
+        @Override
+        public boolean get_readonly() {
+            return true;
+        }
+
+    }
+    
+    
+    /*
+     * ========================================================================================
+     * Support for construction and initialisation
+     * ========================================================================================
+     * 
+     * Methods here help subclasses set the initial state. They are designed with bytearray in mind,
+     * but note that from Python 3, bytes() has the same set of calls and behaviours, although in
+     * Peterson's "sort of backport" to Python 2.x, bytes is effectively an alias for str and
+     * it shows.
+     */
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from
+     * PyObject in subclasses.
+     * 
+     * @see org.python.core.ByteArray#bytearray___init__(PyObject[], String[])
+     * @see org.python.core.ByteArray#ByteArray(PyObject)
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding (must be a string type)
+     * @param errors name of optional errors policy (must be a string type)
+     */
+    protected void init(PyObject arg) {
+
+        if (arg == null) {
+            /*
+             * bytearray() Construct a zero-length bytearray.
+             */
+            setStorage(emptyStorage);
+
+        } else if (arg instanceof PyString) {
+            /*
+             * bytearray(string) Construct from a text string by default encoding and error policy.
+             * Cases where encoding and error policy are specified explicitly are dealt with
+             * elsewhere.
+             */
+            init((PyString)arg, (String)null, (String)null); // Casts select right init()
+
+        } else if (arg.isIndex()) {
+            /*
+             * bytearray(int) Construct a zero-initialised bytearray of the given length.
+             */
+            init(arg.asIndex(Py.OverflowError)); // overflow if too big to be Java int
+
+        } else if (arg instanceof BaseBytes) {
+            /*
+             * bytearray copy of bytearray (or bytes) -- do efficiently
+             */
+            init((BaseBytes)arg);
+
+        } else if (arg instanceof MemoryViewProtocol) {
+            /*
+             * bytearray copy of object supporting Jython implementation of PEP 3118
+             */
+            init(((MemoryViewProtocol)arg).getMemoryView());
+
+        } else {
+            /*
+             * The remaining alternative is an iterable returning (hopefully) right-sized ints. If
+             * it isn't one, we get an exception about not being iterable, or about the values.
+             */
+            init(arg.asIterable());
+
+        }
+    }
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from a
+     * text string with the specified encoding in subclasses.
+     * 
+     * @see #bytearray___init__(PyObject[], String[])
+     * @see PyByteArray#PyByteArray(PyString, String, String)
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding (must be a string type)
+     * @param errors name of optional errors policy (must be a string type)
+     */
+    protected void init(PyString arg, PyObject encoding, PyObject errors) {
+        String enc = encoding == null ? null : encoding.asString();
+        String err = errors == null ? null : errors.asString();
+        init(arg, enc, err);
+    }
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from a
+     * text string with the specified encoding in subclasses.
+     * 
+     * @see #bytearray___init__(PyObject[], String[])
+     * @see PyByteArray#PyByteArray(PyString, String, String)
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding
+     * @param errors name of optional errors policy
+     */
+    protected void init(PyString arg, String encoding, String errors) {
+        // Jython encode emits a String (not byte[])
+        String encoded = encode(arg, encoding, errors);
+        newStorage(encoded.length());
+        setBytes(0, encoded);
+    }
+
+
+    /**
+     * Helper for {@linkplain #setslice(int, int, int, PyObject)},
+     * for <code>__new__</code> and <code>__init__</code> and the Java API constructor from a
+     * text string with the specified encoding in subclasses. This method thinly wraps a call to
+     * the codecs module and deals with checking
+     * for PyUnicode (where the encoding argument is mandatory).
+     * 
+     * @see #ByteArray(PyString, String, String)
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding
+     * @param errors name of optional errors policy
+     * @return encoded string
+     * @throws PyException(TypeError) if the PyString is actually a PyUnicode and encoding is null
+     */
+    protected static String encode(PyString arg, String encoding, String errors) throws PyException {
+        // Jython encode emits a String (not byte[])
+        String encoded;
+
+        if (arg instanceof PyUnicode) {
+            if (encoding != null) {
+                encoded = codecs.encode((PyUnicode)arg, encoding, errors);
+            } else {
+                throw Py.TypeError("unicode argument without an encoding");
+            }
+        } else {
+            if (encoding != null) {
+                encoded = codecs.encode((PyString)arg, encoding, errors);
+            } else {
+                encoded = ((PyString)arg).getString();
+            }
+        }
+        return encoded;
+    }
+
+
+    /**
+     * Fill a defined section of a byte array by copying character values from a String. These
+     * values have to be in the Python byte range 0 to 255.
+     * 
+     * @param start index in this byte array at which the first character code lands
+     * @param value source of characters
+     * @throws PyException(ValueError) if any value[i] > 255
+     */
+    protected void setBytes(int start, String value) throws PyException {
+        int n = value.length();
+        int io = offset + start;
+        for (int j = 0; j < n; j++)
+            storage[io++] = byteCheck(value.charAt(j));
+    }
+
+    /**
+     * Fill a strided slice of a byte array by copying character values from a String. These values
+     * have to be in the Python byte range 0 to 255.
+     * 
+     * @param start index in this byte array at which the first character code lands
+     * @param value source of characters
+     * @throws PyException(ValueError) if any value[i] > 255
+     */
+    protected void setBytes(int start, int step, String value) throws PyException {
+        int n = value.length();
+        int io = offset + start;
+        for (int j = 0; j < n; j++) {
+            storage[io] = byteCheck(value.charAt(j));
+            io += step;
+        }
+    }
+    
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from
+     * int in subclasses. Construct zero-filled bytearray of specified size.
+     * 
+     * @param n size of zero-filled array
+     */
+    protected void init(int n) {
+        if (n < 0) {
+            throw Py.ValueError("negative count");
+        }
+        newStorage(n);
+    }
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from
+     * objects supporting the Jython implementation of PEP 3118 (memoryview) in subclasses.
+     * 
+     * @param value a memoryview object consistent with the slice assignment
+     * @throws PyException(NotImplementedError) until memoryview is properly supported
+     * @throws PyException(TypeError) if the memoryview is not byte-oriented
+     */
+    protected void init(MemoryView value) throws PyException {
+        // XXX Support memoryview once means of access to bytes is defined
+        Py.NotImplementedError("memoryview not yet supported in bytearray");
+        String format = value.get_format();
+        boolean isBytes = format == null || "B".equals(format);
+        if (value.get_ndim() != 1 || !isBytes) {
+            Py.TypeError("memoryview value must be byte-oriented");
+        } else {
+            // Dimensions are given as a PyTuple (although only one)
+            int len = value.get_shape().pyget(0).asInt();
+            // XXX Access to memoryview bytes to go here
+        }
+    }
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from
+     * bytearray or bytes in subclasses.
+     * 
+     * @param source bytearray (or bytes) to copy
+     */
+    protected void init(BaseBytes source) {
+        newStorage(source.size);
+        System.arraycopy(source.storage, source.offset, storage, offset, size);
+    }
+
+    /**
+     * Helper for <code>__new__</code> and <code>__init__</code> and the Java API constructor from
+     * an arbitrary iterable Python type in subclasses. This will include generators and lists.
+     * 
+     * @param iter iterable source of values to enter in the array
+     */
+    protected void init(Iterable<? extends PyObject> iter) {
+        /*
+         * Different strategy is needed from that suited to "random append" operations. We shall
+         * have a stream of append operations, and it might be long.
+         */
+        FragmentList fragList = new FragmentList();
+        fragList.loadFrom(iter);
+        
+        // Now, aggregate all those fragments.
+        //
+        if (fragList.totalCount>0) {
+            
+            if (fragList.size()==1) {
+                // Note that the first fragment is small: negligible waste if stolen directly.
+                Fragment frag = fragList.getFirst();
+                setStorage(frag.storage, frag.count);
+                
+            } else {
+                // Stitch the fragments together in new storage of sufficient size
+                newStorage(fragList.totalCount);
+                fragList.emptyInto(storage, offset);
+            }
+            
+        } else
+            // Nothing in the iterator
+            setStorage(emptyStorage);
+    }
+
+    
+
+    
+    /**
+     * Intended as a fragment of temporary storage for use we do not know how many bytes of allocate, and we are
+     * reading in some kind of iterable stream.
+     */
+    protected static class Fragment {
+
+        static final int MINSIZE = 8;
+        static final int MAXSIZE = 1024;
+
+        byte[] storage;
+        int count = 0;
+
+        Fragment(int size) {
+            storage = new byte[size];
+        }
+
+        // Convert to byte and add to buffer
+        boolean isFilledBy(PyObject value) {
+            storage[count++] = byteCheck(value);
+            return count == storage.length;
+        }
+    }
+    
+    /**
+     * A container of temporary storage when we do not know how many bytes to allocate, and we are
+     * reading in some kind of iterable stream.
+     */
+    protected static class FragmentList extends LinkedList<Fragment> {
+
+        /**
+         * Total number of bytes being held.
+         */
+        int totalCount = 0;
+
+        /**
+         * Load bytes into the container from the given iterable
+         * 
+         * @param iter iterable source of values to enter into the container
+         * @throws PyException(TypeError) if any value not acceptable type
+         * @throws PyException(ValueError) if any value<0 or value>255 or string length!=1
+         */
+        void loadFrom(Iterable<? extends PyObject> iter) throws PyException {
+
+            int fragSize = Fragment.MINSIZE;
+            Fragment curr = null;
+
+            // Allocate series of fragments as needed, while the iterator runs to completion
+            //
+            for (PyObject value : iter) {
+                if (curr == null) {
+                    // Need a new Fragment
+                    curr = new Fragment(fragSize);
+                    add(curr);
+                    if (fragSize < Fragment.MAXSIZE) {
+                        fragSize <<= 1;
+                    }
+                }
+                // Insert next item from iterator.
+                if (curr.isFilledBy(value)) {
+                    // Fragment is now full: signal a new one will be needed
+                    totalCount += curr.count;
+                    curr = null;
+                }
+            }
+
+            // Don't forget the bytes in the final Fragment
+            if (curr != null) {
+                totalCount += curr.count;
+            }
+        }
+
+        /**
+         * Move the contents of this container to the given byte array at the specified index.
+         * This method leaves this container empty.
+         * @param target destination array
+         * @param p position to write first byte
+         */
+        void emptyInto(byte[] target, int p) {
+
+            for (Fragment frag : this) {
+                System.arraycopy(frag.storage, 0, target, p, frag.count);
+                p += frag.count;
+            }
+            clear(); // Encourage recycling
+            totalCount = 0;
+        }
+
+        /**
+         * Move the contents of this container to a strided subset of the given byte array at the
+         * specified index. Bytes are assigned at start, start+step, start+2*step, and so on until
+         * we run out. (You must have checked beforehand that the destination is big enough.) This
+         * method leaves this container empty. If the step size is one, it would be much quicker to
+         * call {@link BaseBytes#emptyInto(byte[], int)}
+         * 
+         * @param target destination array
+         * @param start position to write first byte
+         * @param step amount to advance index with each byte
+         */
+        void emptyInto(byte[] target, int start, int step) {
+            int p = start;
+            for (Fragment frag : this) {
+                for (int i = 0; i < frag.count; i++) {
+                    target[p] = frag.storage[i];
+                    p += step;
+                }
+            }
+            clear(); // Encourage recycling
+            totalCount = 0;
+        }
+
+    }
+    
+    
+    
+    /* ========================================================================================
+     * Sharable storage
+     * ========================================================================================
+     * 
+     * The storage is provided by a byte array that may be somewhat larger than the number of
+     * bytes actually stored, and these bytes may begin at an offset within the storage.
+     * Immutable subclasses of BaseBytes may exploit this to share storage when 
+     * constructed from a slice of another immutable subclass. Mutable subclasses may exploit it
+     * to provide efficient insertions near the start of the array.
+     */
+    
+    /** Empty storage constant */
+    protected static final byte[] emptyStorage = new byte[0];
+    
+    /** Storage array. */
+    protected byte[] storage;
+    
+    /** Number of bytes actually used in storage array. */
+    protected int size;
+
+    /** Index of first byte used in storage array. */
+    protected int offset;
+
+    /**
+     * Check that an index is within the range of the array, that is <tt>0&lt;=index&lt;size</tt>.
+     * @param index to check
+     * @throws PyException(IndexError) if the index is outside the array bounds
+     */
+    protected final void indexCheck(int index) throws PyException {
+        if (index<0 || index>=size) {
+            throw Py.IndexError(getType().fastGetName() + " index out of range");
+        }
+    }
+
+    /**
+     * Allocate fresh, zero-filled storage for the requested number of bytes and make that the size.
+     * If the size needed is zero, the "storage" allocated is the shared emptyStorage array. The
+     * allocated size may be bigger than needed, and the method chooses a value for offset.
+     * 
+     * @param needed becomes the new value of this.size
+     */
+    protected void newStorage(int needed) {
+        // The implementation for immutable arrays allocates exactly, and with offset zero.
+        if (needed > 0) {
+            setStorage(new byte[needed]); // guaranteed zero (by JLS 2ed para 4.5.5)
+        } else {
+            setStorage(emptyStorage);
+        }
+    }
+
+    
+    /**
+     * Check that an integer is suitable for storage in a (Python) byte array,
+     * and convert it to the Java byte value that can be stored there.
+     * (Java bytes run -128..127 whereas Python bytes run 0..255.)
+     * @param value to convert.
+     * @throws PyException(ValueError) if value<0 or value>255
+     */
+    protected static final byte byteCheck(int value) throws PyException {
+        if (value<0 || value>=255) {
+            throw Py.ValueError("byte must be in range(0, 256)");
+        }
+        return (byte) value;
+    }
+    
+    /**
+     * Check that the value of an PyInteger is suitable for storage in a (Python) byte array,
+     * and convert it to the Java byte value that can be stored there.
+     * (Java bytes run -128..127 whereas Python bytes run 0..255.)
+     * @param value to convert.
+     * @throws PyException(ValueError) if value<0 or value>255
+     */
+    protected static final byte byteCheck(PyInteger value) throws PyException {
+        return byteCheck(value.asInt());
+    }
+    
+    /**
+     * Check that the type and value of a PyObject is suitable for storage in a (Python) byte
+     * array, and convert it to the Java byte value that can be stored there.
+     * (Java bytes run -128..127 whereas Python bytes run 0..255.)
+     * Acceptable types are: <ul>
+     * <li>PyInteger in range 0 to 255 inclusive</li>
+     * <li>PyLong in range 0 to 255 inclusive</li>
+     * <li>PyString of length 1</li>
+     * </ul>
+     * @param value to convert.
+     * @throws PyException(TypeError) if not acceptable type
+     * @throws PyException(ValueError) if value<0 or value>255 or string length!=1
+     */
+    protected static final byte byteCheck(PyObject value) throws PyException {
+        if (value instanceof PyInteger || value instanceof PyLong) {
+            // This will possibly produce Py.OverflowError("long int too large to convert")
+            return byteCheck(value.asInt());
+        } else if (value instanceof PyString) {
+            String strValue = ((PyString)value).getString();
+            if (strValue.length() != 1) {
+                throw Py.ValueError("string must be of size 1");
+            }
+            return byteCheck(strValue.charAt(0));
+        } else
+            throw Py.TypeError("an integer or string of size 1 is required");
+    }
+    
+    /* ========================================================================================
+     * API for org.python.core.PySequence
+     * ========================================================================================
+     */
+    protected PyInteger pyget(int index) {
+        return new PyInteger(intAt(index));
+    }
+    
+    /* We're not implementing these here, but we can give a stronger guarantee about the return
+     * type and save some casting and type anxiety.
+     */
+    protected abstract BaseBytes getslice(int start, int stop, int step);
+    protected abstract BaseBytes repeat(int count);
+    
+    /*
+     * And this extension point should be overridden in mutable subclasses
+     */
+    
+    /**
+     * Insert the element (interpreted as a Python byte value) at the given index. The default
+     * implementation produces a Python TypeError, for the benefit of immutable types. Mutable types
+     * must override it.
+     * 
+     * @param index to insert at
+     * @param element to insert (by value)
+     * @throws PyException(IndexError) if the index is outside the array bounds
+     * @throws PyException(ValueError) if element<0 or element>255
+     * @throws PyException(TypeError) if the subclass is immutable
+     */
+    public void pyadd(int index, PyInteger element) {
+        // This won't succeed: it just produces the right error.
+        // storageReplace(index, 0, 1);
+        pyset(index, element);
+    }
+    
+    /* ========================================================================================
+     * API for Java access as byte[]
+     * ========================================================================================
+     *
+     * Just the immutable case for now
+     */
+
+    /**
+     * No range check access to byte[index].
+     * @param index
+     * @return the byte at the given index
+     */
+    private final synchronized byte byteAt(int index) {
+        return storage[index+offset]; 
+    }
+
+    /**
+     * Return the Python byte (in range 0 to 255 inclusive) at the given index.
+     * @param index of value in byte array
+     * @return the integer value at the index
+     * @throws PyException(IndexError) if the index is outside the array bounds
+     */
+    public synchronized int intAt(int index) throws PyException {
+        indexCheck(index);
+        return 0xff & ((int)byteAt(index)); 
+    }
+
+    /**
+     * Helper to implement {@link #repeat(int)}. Use something like:
+     * 
+     * <pre>
+     * 
+     * &#064;Override
+     * protected PyByteArray repeat(int count) {
+     *     PyByteArray ret = new PyByteArray();
+     *     ret.setStorage(repeatImpl(count));
+     *     return ret;
+     * }
+     * </pre>
+     * 
+     * @param count the number of times to repeat this.
+     * @return this byte array repeated count times.
+     */
+    protected synchronized byte[] repeatImpl(int count) {
+        byte[] dst = new byte[count * size];
+        for (int i = 0, p = 0; i < count; i++, p += size) {
+            System.arraycopy(storage, offset, dst, p, size);
+        }
+        return dst;
+    }
+
+
+    /* ========================================================================================
+     * API for java.util.List<PyInteger>
+     * ========================================================================================
+     */
+
+    /**
+     * Access to the bytearray (or bytes) as a {@link java.util.List}. The List interface supplied
+     * by BaseBytes delegates to this object.
+     */
+    protected final List<PyInteger> listDelegate = new AbstractList<PyInteger>() {
+
+        @Override
+        public PyInteger get(int index) {
+            // Not using __getitem__ as it applies Python index semantics to e.g. b[-1].
+            indexCheck(index);
+            return pyget(index);
+        }
+
+        @Override
+        public int size() { return size; }
+
+        // For mutable subclass use
+        
+        /**
+         * Replaces the element at the specified position in this list with the specified element.
+         * @see java.util.AbstractList#set(int, java.lang.Object)
+         * @throws PyException(TypeError) if actual class is immutable
+         * @throws PyException(IndexError) if the index is outside the array bounds
+         * @throws PyException(ValueError) if element<0 or element>255
+         */
+        @Override
+        public PyInteger set(int index, PyInteger element) throws PyException {
+            // Not using __setitem__ as it applies Python index semantics to e.g. b[-1].
+            indexCheck(index);
+            PyInteger result = pyget(index);
+            pyset(index, element);      // TypeError if immutable
+            return result;
+        }
+
+        /**
+         * Inserts the specified element at the specified position in this list.
+         * Shifts the element currently at that position and any subsequent elements to the right.
+         * @see java.util.AbstractList#add(int, java.lang.Object)
+         * @throws PyException(IndexError) if the index is outside the array bounds
+         * @throws PyException(ValueError) if element<0 or element>255
+         * @throws PyException(TypeError) if the owning concrete subclass is immutable
+         */
+        @Override
+        public void add(int index, PyInteger element) throws PyException {
+            // Not using __setitem__ as it applies Python index semantics to e.g. b[-1].
+            indexCheck(index);
+            pyadd(index, element);          // TypeError if immutable
+        }
+
+        /**
+         * Removes the element at the specified position in this list. Shifts any subsequent
+         * elements to the left (subtracts one from their indices).
+         * Returns the element that was removed from the list.
+         * @see java.util.AbstractList#remove(int)
+         * @throws PyException(IndexError) if the index is outside the array bounds
+         */
+        @Override
+        public PyInteger remove(int index) {
+            // Not using __delitem__ as it applies Python index semantics to e.g. b[-1].
+            indexCheck(index);
+            PyInteger result = pyget(index);
+            del(index);      // TypeError if immutable
+            return result;
+        }
+    };
+
+    /** 
+     * Number of bytes in bytearray (or bytes) object. 
+     * @see java.util.List#size()
+     * @return Number of bytes in byte array.
+     * */
+    public int size() { return size;}
+
+    /*
+     * @see java.util.List#isEmpty()
+     */
+    public boolean isEmpty() { return size==0; }
+
+    /**
+     * Returns true if this list contains the specified value. More formally, returns true if and
+     * only if this list contains at least one integer e such that o.equals(PyInteger(e)).
+     */
+    public boolean contains(Object o) {
+        return listDelegate.contains(o);
+    }
+
+    /*
+     * @return
+     * @see java.util.List#iterator()
+     */
+    public Iterator<PyInteger> iterator() {
+        return listDelegate.iterator();
+    }
+
+    /*
+     * @return
+     * @see java.util.List#toArray()
+     */
+    public Object[] toArray() {
+        return listDelegate.toArray();
+    }
+
+    /*
+     * @param a
+     * @return
+     * @see java.util.List#toArray(T[])
+     */
+    public <T> T[] toArray(T[] a) {
+        return listDelegate.toArray(a);
+    }
+
+    /*
+     * @param o
+     * @return
+     * @see java.util.List#add(java.lang.Object)
+     */
+    public boolean add(PyInteger o) {
+        return listDelegate.add(o);
+    }
+
+    /*
+     * @param o
+     * @return
+     * @see java.util.List#remove(java.lang.Object)
+     */
+    public boolean remove(Object o) {
+        return listDelegate.remove(o);
+    }
+
+    /*
+     * @param c
+     * @return
+     * @see java.util.List#containsAll(java.util.Collection)
+     */
+    public boolean containsAll(Collection<?> c) {
+        return listDelegate.containsAll(c);
+    }
+
+    /*
+     * @param c
+     * @return
+     * @see java.util.List#addAll(java.util.Collection)
+     */
+    public boolean addAll(Collection<? extends PyInteger> c) {
+        return listDelegate.addAll(c);
+    }
+
+    /*
+     * @param index
+     * @param c
+     * @return
+     * @see java.util.List#addAll(int, java.util.Collection)
+     */
+    public boolean addAll(int index, Collection<? extends PyInteger> c) {
+        return listDelegate.addAll(index, c);
+    }
+
+    /*
+     * @param c
+     * @return
+     * @see java.util.List#removeAll(java.util.Collection)
+     */
+    public boolean removeAll(Collection<?> c) {
+        return listDelegate.removeAll(c);
+    }
+
+    /*
+     * @param c
+     * @return
+     * @see java.util.List#retainAll(java.util.Collection)
+     */
+    public boolean retainAll(Collection<?> c) {
+        return listDelegate.retainAll(c);
+    }
+
+    /*
+     * 
+     * @see java.util.List#clear()
+     */
+    public void clear() {
+        listDelegate.clear();
+    }
+
+    /*
+     * @param o
+     * @return
+     * @see java.util.List#equals(java.lang.Object)
+     */
+    public boolean equals(Object o) {
+        return listDelegate.equals(o);
+    }
+
+    /*
+     * @return
+     * @see java.util.List#hashCode()
+     */
+    public int hashCode() {
+        return listDelegate.hashCode();
+    }
+
+    /*
+     * @param index
+     * @return
+     * @see java.util.List#get(int)
+     */
+    public PyInteger get(int index) {
+        return listDelegate.get(index);
+    }
+
+    /*
+     * @param index
+     * @param element
+     * @return
+     * @see java.util.List#set(int, java.lang.Object)
+     */
+    public PyInteger set(int index, PyInteger element) {
+        return listDelegate.set(index, element);
+    }
+
+    /*
+     * @param index
+     * @param element
+     * @see java.util.List#add(int, java.lang.Object)
+     */
+    public void add(int index, PyInteger element) {
+        listDelegate.add(index, element);
+    }
+
+    /*
+     * @param index
+     * @return
+     * @see java.util.List#remove(int)
+     */
+    public PyInteger remove(int index) {
+        return listDelegate.remove(index);
+    }
+
+    /*
+     * @param o
+     * @return
+     * @see java.util.List#indexOf(java.lang.Object)
+     */
+    public int indexOf(Object o) {
+        return listDelegate.indexOf(o);
+    }
+
+    /*
+     * @param o
+     * @return
+     * @see java.util.List#lastIndexOf(java.lang.Object)
+     */
+    public int lastIndexOf(Object o) {
+        return listDelegate.lastIndexOf(o);
+    }
+
+    /*
+     * @return
+     * @see java.util.List#listIterator()
+     */
+    public ListIterator<PyInteger> listIterator() {
+        return listDelegate.listIterator();
+    }
+
+    /*
+     * @param index
+     * @return
+     * @see java.util.List#listIterator(int)
+     */
+    public ListIterator<PyInteger> listIterator(int index) {
+        return listDelegate.listIterator(index);
+    }
+
+    /*
+     * @param fromIndex
+     * @param toIndex
+     * @return
+     * @see java.util.List#subList(int, int)
+     */
+    public List<PyInteger> subList(int fromIndex, int toIndex) {
+        return listDelegate.subList(fromIndex, toIndex);
+    }
+     
+}
diff --git a/src/org/python/core/BuiltinDocs.java b/src/org/python/core/BuiltinDocs.java
--- a/src/org/python/core/BuiltinDocs.java
+++ b/src/org/python/core/BuiltinDocs.java
@@ -1,4115 +1,4518 @@
-// generated by make_pydocs.py
-
-package org.python.core;
-
-public class BuiltinDocs {
-
-    // Docs for <type 'object'>
-    public final static String object___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String object___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String object_doc = 
-        "The most base type";
-
-    public final static String object___format___doc = 
-        "default object formatter";
-
-    public final static String object___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String object___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String object___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String object___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String object___reduce___doc = 
-        "helper for pickle";
-
-    public final static String object___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String object___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String object___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String object___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String object___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String object___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    // Docs for <type 'type'>
-    public final static String type___abstractmethods___doc = 
-        "";
-
-    public final static String type___base___doc = 
-        "The most base type";
-
-    public final static String type___bases___doc = 
-        "tuple() -> empty tuple\n" + 
-        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
-        "\n" + 
-        "If the argument is a tuple, the return value is the same object.";
-
-    public final static String type___basicsize___doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String type___call___doc = 
-        "x.__call__(...) <==> x(...)";
-
-    public final static String type___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String type___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String type___dict___doc = 
-        "";
-
-    public final static String type___dictoffset___doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String type_doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String type___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String type___flags___doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String type___format___doc = 
-        "default object formatter";
-
-    public final static String type___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String type___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String type___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String type___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String type___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String type___instancecheck___doc = 
-        "__instancecheck__() -> bool\n" + 
-        "check if an object is an instance";
-
-    public final static String type___itemsize___doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String type___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String type___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String type___module___doc = 
-        "str(object) -> string\n" + 
-        "\n" + 
-        "Return a nice string representation of the object.\n" + 
-        "If the argument is a string, the return value is the same object.";
-
-    public final static String type___mro___doc = 
-        "tuple() -> empty tuple\n" + 
-        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
-        "\n" + 
-        "If the argument is a tuple, the return value is the same object.";
-
-    public final static String type___name___doc = 
-        "str(object) -> string\n" + 
-        "\n" + 
-        "Return a nice string representation of the object.\n" + 
-        "If the argument is a string, the return value is the same object.";
-
-    public final static String type___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String type___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String type___reduce___doc = 
-        "helper for pickle";
-
-    public final static String type___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String type___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String type___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String type___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String type___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String type___subclasscheck___doc = 
-        "__subclasscheck__() -> bool\n" + 
-        "check if a class is a subclass";
-
-    public final static String type___subclasses___doc = 
-        "__subclasses__() -> list of immediate subclasses";
-
-    public final static String type___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String type___weakrefoffset___doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String type_mro_doc = 
-        "mro() -> list\n" + 
-        "return a type's method resolution order";
-
-    // Docs for <type 'unicode'>
-    public final static String unicode___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String unicode___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String unicode___contains___doc = 
-        "x.__contains__(y) <==> y in x";
-
-    public final static String unicode___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String unicode_doc = 
-        "unicode(string [, encoding[, errors]]) -> object\n" + 
-        "\n" + 
-        "Create a new Unicode object from the given encoded string.\n" + 
-        "encoding defaults to the current default string encoding.\n" + 
-        "errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.";
-
-    public final static String unicode___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String unicode___format___doc = 
-        "S.__format__(format_spec) -> unicode\n" + 
-        "\n" + 
-        "Return a formatted version of S as described by format_spec.";
-
-    public final static String unicode___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String unicode___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String unicode___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String unicode___getnewargs___doc = 
-        "";
-
-    public final static String unicode___getslice___doc = 
-        "x.__getslice__(i, j) <==> x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String unicode___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String unicode___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String unicode___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String unicode___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String unicode___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String unicode___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String unicode___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String unicode___mul___doc = 
-        "x.__mul__(n) <==> x*n";
-
-    public final static String unicode___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String unicode___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String unicode___reduce___doc = 
-        "helper for pickle";
-
-    public final static String unicode___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String unicode___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String unicode___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String unicode___rmul___doc = 
-        "x.__rmul__(n) <==> n*x";
-
-    public final static String unicode___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String unicode___sizeof___doc = 
-        "S.__sizeof__() -> size of S in memory, in bytes\n" + 
-        "\n" + 
-        "";
-
-    public final static String unicode___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String unicode___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String unicode__formatter_field_name_split_doc = 
-        "";
-
-    public final static String unicode__formatter_parser_doc = 
-        "";
-
-    public final static String unicode_capitalize_doc = 
-        "S.capitalize() -> unicode\n" + 
-        "\n" + 
-        "Return a capitalized version of S, i.e. make the first character\n" + 
-        "have upper case and the rest lower case.";
-
-    public final static String unicode_center_doc = 
-        "S.center(width[, fillchar]) -> unicode\n" + 
-        "\n" + 
-        "Return S centered in a Unicode string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space)";
-
-    public final static String unicode_count_doc = 
-        "S.count(sub[, start[, end]]) -> int\n" + 
-        "\n" + 
-        "Return the number of non-overlapping occurrences of substring sub in\n" + 
-        "Unicode string S[start:end].  Optional arguments start and end are\n" + 
-        "interpreted as in slice notation.";
-
-    public final static String unicode_decode_doc = 
-        "S.decode([encoding[,errors]]) -> string or unicode\n" + 
-        "\n" + 
-        "Decodes S using the codec registered for encoding. encoding defaults\n" + 
-        "to the default encoding. errors may be given to set a different error\n" + 
-        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
-        "a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n" + 
-        "as well as any other name registerd with codecs.register_error that is\n" + 
-        "able to handle UnicodeDecodeErrors.";
-
-    public final static String unicode_encode_doc = 
-        "S.encode([encoding[,errors]]) -> string or unicode\n" + 
-        "\n" + 
-        "Encodes S using the codec registered for encoding. encoding defaults\n" + 
-        "to the default encoding. errors may be given to set a different error\n" + 
-        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
-        "a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n" + 
-        "'xmlcharrefreplace' as well as any other name registered with\n" + 
-        "codecs.register_error that can handle UnicodeEncodeErrors.";
-
-    public final static String unicode_endswith_doc = 
-        "S.endswith(suffix[, start[, end]]) -> bool\n" + 
-        "\n" + 
-        "Return True if S ends with the specified suffix, False otherwise.\n" + 
-        "With optional start, test S beginning at that position.\n" + 
-        "With optional end, stop comparing S at that position.\n" + 
-        "suffix can also be a tuple of strings to try.";
-
-    public final static String unicode_expandtabs_doc = 
-        "S.expandtabs([tabsize]) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of S where all tab characters are expanded using spaces.\n" + 
-        "If tabsize is not given, a tab size of 8 characters is assumed.";
-
-    public final static String unicode_find_doc = 
-        "S.find(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Return the lowest index in S where substring sub is found,\n" + 
-        "such that sub is contained within s[start:end].  Optional\n" + 
-        "arguments start and end are interpreted as in slice notation.\n" + 
-        "\n" + 
-        "Return -1 on failure.";
-
-    public final static String unicode_format_doc = 
-        "S.format(*args, **kwargs) -> unicode\n" + 
-        "\n" + 
-        "Return a formatted version of S, using substitutions from args and kwargs.\n" + 
-        "The substitutions are identified by braces ('{' and '}').";
-
-    public final static String unicode_index_doc = 
-        "S.index(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Like S.find() but raise ValueError when the substring is not found.";
-
-    public final static String unicode_isalnum_doc = 
-        "S.isalnum() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are alphanumeric\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String unicode_isalpha_doc = 
-        "S.isalpha() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are alphabetic\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String unicode_isdecimal_doc = 
-        "S.isdecimal() -> bool\n" + 
-        "\n" + 
-        "Return True if there are only decimal characters in S,\n" + 
-        "False otherwise.";
-
-    public final static String unicode_isdigit_doc = 
-        "S.isdigit() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are digits\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String unicode_islower_doc = 
-        "S.islower() -> bool\n" + 
-        "\n" + 
-        "Return True if all cased characters in S are lowercase and there is\n" + 
-        "at least one cased character in S, False otherwise.";
-
-    public final static String unicode_isnumeric_doc = 
-        "S.isnumeric() -> bool\n" + 
-        "\n" + 
-        "Return True if there are only numeric characters in S,\n" + 
-        "False otherwise.";
-
-    public final static String unicode_isspace_doc = 
-        "S.isspace() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are whitespace\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String unicode_istitle_doc = 
-        "S.istitle() -> bool\n" + 
-        "\n" + 
-        "Return True if S is a titlecased string and there is at least one\n" + 
-        "character in S, i.e. upper- and titlecase characters may only\n" + 
-        "follow uncased characters and lowercase characters only cased ones.\n" + 
-        "Return False otherwise.";
-
-    public final static String unicode_isupper_doc = 
-        "S.isupper() -> bool\n" + 
-        "\n" + 
-        "Return True if all cased characters in S are uppercase and there is\n" + 
-        "at least one cased character in S, False otherwise.";
-
-    public final static String unicode_join_doc = 
-        "S.join(iterable) -> unicode\n" + 
-        "\n" + 
-        "Return a string which is the concatenation of the strings in the\n" + 
-        "iterable.  The separator between elements is S.";
-
-    public final static String unicode_ljust_doc = 
-        "S.ljust(width[, fillchar]) -> int\n" + 
-        "\n" + 
-        "Return S left-justified in a Unicode string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space).";
-
-    public final static String unicode_lower_doc = 
-        "S.lower() -> unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S converted to lowercase.";
-
-    public final static String unicode_lstrip_doc = 
-        "S.lstrip([chars]) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with leading whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is a str, it will be converted to unicode before stripping";
-
-    public final static String unicode_partition_doc = 
-        "S.partition(sep) -> (head, sep, tail)\n" + 
-        "\n" + 
-        "Search for the separator sep in S, and return the part before it,\n" + 
-        "the separator itself, and the part after it.  If the separator is not\n" + 
-        "found, return S and two empty strings.";
-
-    public final static String unicode_replace_doc = 
-        "S.replace(old, new[, count]) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of S with all occurrences of substring\n" + 
-        "old replaced by new.  If the optional argument count is\n" + 
-        "given, only the first count occurrences are replaced.";
-
-    public final static String unicode_rfind_doc = 
-        "S.rfind(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Return the highest index in S where substring sub is found,\n" + 
-        "such that sub is contained within s[start:end].  Optional\n" + 
-        "arguments start and end are interpreted as in slice notation.\n" + 
-        "\n" + 
-        "Return -1 on failure.";
-
-    public final static String unicode_rindex_doc = 
-        "S.rindex(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Like S.rfind() but raise ValueError when the substring is not found.";
-
-    public final static String unicode_rjust_doc = 
-        "S.rjust(width[, fillchar]) -> unicode\n" + 
-        "\n" + 
-        "Return S right-justified in a Unicode string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space).";
-
-    public final static String unicode_rpartition_doc = 
-        "S.rpartition(sep) -> (head, sep, tail)\n" + 
-        "\n" + 
-        "Search for the separator sep in S, starting at the end of S, and return\n" + 
-        "the part before it, the separator itself, and the part after it.  If the\n" + 
-        "separator is not found, return two empty strings and S.";
-
-    public final static String unicode_rsplit_doc = 
-        "S.rsplit([sep [,maxsplit]]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the words in S, using sep as the\n" + 
-        "delimiter string, starting at the end of the string and\n" + 
-        "working to the front.  If maxsplit is given, at most maxsplit\n" + 
-        "splits are done. If sep is not specified, any whitespace string\n" + 
-        "is a separator.";
-
-    public final static String unicode_rstrip_doc = 
-        "S.rstrip([chars]) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with trailing whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is a str, it will be converted to unicode before stripping";
-
-    public final static String unicode_split_doc = 
-        "S.split([sep [,maxsplit]]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the words in S, using sep as the\n" + 
-        "delimiter string.  If maxsplit is given, at most maxsplit\n" + 
-        "splits are done. If sep is not specified or is None, any\n" + 
-        "whitespace string is a separator and empty strings are\n" + 
-        "removed from the result.";
-
-    public final static String unicode_splitlines_doc = 
-        "S.splitlines([keepends]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the lines in S, breaking at line boundaries.\n" + 
-        "Line breaks are not included in the resulting list unless keepends\n" + 
-        "is given and true.";
-
-    public final static String unicode_startswith_doc = 
-        "S.startswith(prefix[, start[, end]]) -> bool\n" + 
-        "\n" + 
-        "Return True if S starts with the specified prefix, False otherwise.\n" + 
-        "With optional start, test S beginning at that position.\n" + 
-        "With optional end, stop comparing S at that position.\n" + 
-        "prefix can also be a tuple of strings to try.";
-
-    public final static String unicode_strip_doc = 
-        "S.strip([chars]) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with leading and trailing\n" + 
-        "whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is a str, it will be converted to unicode before stripping";
-
-    public final static String unicode_swapcase_doc = 
-        "S.swapcase() -> unicode\n" + 
-        "\n" + 
-        "Return a copy of S with uppercase characters converted to lowercase\n" + 
-        "and vice versa.";
-
-    public final static String unicode_title_doc = 
-        "S.title() -> unicode\n" + 
-        "\n" + 
-        "Return a titlecased version of S, i.e. words start with title case\n" + 
-        "characters, all remaining cased characters have lower case.";
-
-    public final static String unicode_translate_doc = 
-        "S.translate(table) -> unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S, where all characters have been mapped\n" + 
-        "through the given translation table, which must be a mapping of\n" + 
-        "Unicode ordinals to Unicode ordinals, Unicode strings or None.\n" + 
-        "Unmapped characters are left untouched. Characters mapped to None\n" + 
-        "are deleted.";
-
-    public final static String unicode_upper_doc = 
-        "S.upper() -> unicode\n" + 
-        "\n" + 
-        "Return a copy of S converted to uppercase.";
-
-    public final static String unicode_zfill_doc = 
-        "S.zfill(width) -> unicode\n" + 
-        "\n" + 
-        "Pad a numeric string S with zeros on the left, to fill a field\n" + 
-        "of the specified width. The string S is never truncated.";
-
-    // Docs for <type 'dict'>
-    public final static String dict___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String dict___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String dict___contains___doc = 
-        "D.__contains__(k) -> True if D has a key k, else False";
-
-    public final static String dict___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String dict___delitem___doc = 
-        "x.__delitem__(y) <==> del x[y]";
-
-    public final static String dict_doc = 
-        "dict() -> new empty dictionary\n" + 
-        "dict(mapping) -> new dictionary initialized from a mapping object's\n" + 
-        "    (key, value) pairs\n" + 
-        "dict(iterable) -> new dictionary initialized as if via:\n" + 
-        "    d = {}\n" + 
-        "    for k, v in iterable:\n" + 
-        "        d[k] = v\n" + 
-        "dict(**kwargs) -> new dictionary initialized with the name=value pairs\n" + 
-        "    in the keyword argument list.  For example:  dict(one=1, two=2)";
-
-    public final static String dict___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String dict___format___doc = 
-        "default object formatter";
-
-    public final static String dict___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String dict___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String dict___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String dict___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String dict___hash___doc = 
-        "";
-
-    public final static String dict___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String dict___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String dict___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String dict___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String dict___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String dict___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String dict___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String dict___reduce___doc = 
-        "helper for pickle";
-
-    public final static String dict___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String dict___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String dict___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String dict___setitem___doc = 
-        "x.__setitem__(i, y) <==> x[i]=y";
-
-    public final static String dict___sizeof___doc = 
-        "D.__sizeof__() -> size of D in memory, in bytes";
-
-    public final static String dict___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String dict___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String dict_clear_doc = 
-        "D.clear() -> None.  Remove all items from D.";
-
-    public final static String dict_copy_doc = 
-        "D.copy() -> a shallow copy of D";
-
-    public final static String dict_fromkeys_doc = 
-        "dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.\n" + 
-        "v defaults to None.";
-
-    public final static String dict_get_doc = 
-        "D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.";
-
-    public final static String dict_has_key_doc = 
-        "D.has_key(k) -> True if D has a key k, else False";
-
-    public final static String dict_items_doc = 
-        "D.items() -> list of D's (key, value) pairs, as 2-tuples";
-
-    public final static String dict_iteritems_doc = 
-        "D.iteritems() -> an iterator over the (key, value) items of D";
-
-    public final static String dict_iterkeys_doc = 
-        "D.iterkeys() -> an iterator over the keys of D";
-
-    public final static String dict_itervalues_doc = 
-        "D.itervalues() -> an iterator over the values of D";
-
-    public final static String dict_keys_doc = 
-        "D.keys() -> list of D's keys";
-
-    public final static String dict_pop_doc = 
-        "D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n" + 
-        "If key is not found, d is returned if given, otherwise KeyError is raised";
-
-    public final static String dict_popitem_doc = 
-        "D.popitem() -> (k, v), remove and return some (key, value) pair as a\n" + 
-        "2-tuple; but raise KeyError if D is empty.";
-
-    public final static String dict_setdefault_doc = 
-        "D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D";
-
-    public final static String dict_update_doc = 
-        "D.update(E, **F) -> None.  Update D from dict/iterable E and F.\n" + 
-        "If E has a .keys() method, does:     for k in E: D[k] = E[k]\n" + 
-        "If E lacks .keys() method, does:     for (k, v) in E: D[k] = v\n" + 
-        "In either case, this is followed by: for k in F: D[k] = F[k]";
-
-    public final static String dict_values_doc = 
-        "D.values() -> list of D's values";
-
-    public final static String dict_viewitems_doc = 
-        "D.viewitems() -> a set-like object providing a view on D's items";
-
-    public final static String dict_viewkeys_doc = 
-        "D.viewkeys() -> a set-like object providing a view on D's keys";
-
-    public final static String dict_viewvalues_doc = 
-        "D.viewvalues() -> an object providing a view on D's values";
-
-    // Docs for <type 'list'>
-    public final static String list___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String list___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String list___contains___doc = 
-        "x.__contains__(y) <==> y in x";
-
-    public final static String list___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String list___delitem___doc = 
-        "x.__delitem__(y) <==> del x[y]";
-
-    public final static String list___delslice___doc = 
-        "x.__delslice__(i, j) <==> del x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String list_doc = 
-        "list() -> new empty list\n" + 
-        "list(iterable) -> new list initialized from iterable's items";
-
-    public final static String list___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String list___format___doc = 
-        "default object formatter";
-
-    public final static String list___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String list___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String list___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String list___getslice___doc = 
-        "x.__getslice__(i, j) <==> x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String list___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String list___hash___doc = 
-        "";
-
-    public final static String list___iadd___doc = 
-        "x.__iadd__(y) <==> x+=y";
-
-    public final static String list___imul___doc = 
-        "x.__imul__(y) <==> x*=y";
-
-    public final static String list___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String list___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String list___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String list___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String list___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String list___mul___doc = 
-        "x.__mul__(n) <==> x*n";
-
-    public final static String list___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String list___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String list___reduce___doc = 
-        "helper for pickle";
-
-    public final static String list___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String list___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String list___reversed___doc = 
-        "L.__reversed__() -- return a reverse iterator over the list";
-
-    public final static String list___rmul___doc = 
-        "x.__rmul__(n) <==> n*x";
-
-    public final static String list___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String list___setitem___doc = 
-        "x.__setitem__(i, y) <==> x[i]=y";
-
-    public final static String list___setslice___doc = 
-        "x.__setslice__(i, j, y) <==> x[i:j]=y\n" + 
-        "           \n" + 
-        "           Use  of negative indices is not supported.";
-
-    public final static String list___sizeof___doc = 
-        "L.__sizeof__() -- size of L in memory, in bytes";
-
-    public final static String list___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String list___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String list_append_doc = 
-        "L.append(object) -- append object to end";
-
-    public final static String list_count_doc = 
-        "L.count(value) -> integer -- return number of occurrences of value";
-
-    public final static String list_extend_doc = 
-        "L.extend(iterable) -- extend list by appending elements from the iterable";
-
-    public final static String list_index_doc = 
-        "L.index(value, [start, [stop]]) -> integer -- return first index of value.\n" + 
-        "Raises ValueError if the value is not present.";
-
-    public final static String list_insert_doc = 
-        "L.insert(index, object) -- insert object before index";
-
-    public final static String list_pop_doc = 
-        "L.pop([index]) -> item -- remove and return item at index (default last).\n" + 
-        "Raises IndexError if list is empty or index is out of range.";
-
-    public final static String list_remove_doc = 
-        "L.remove(value) -- remove first occurrence of value.\n" + 
-        "Raises ValueError if the value is not present.";
-
-    public final static String list_reverse_doc = 
-        "L.reverse() -- reverse *IN PLACE*";
-
-    public final static String list_sort_doc = 
-        "L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;\n" + 
-        "cmp(x, y) -> -1, 0, 1";
-
-    // Docs for <type 'slice'>
-    public final static String slice___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String slice___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String slice___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String slice_doc = 
-        "slice([start,] stop[, step])\n" + 
-        "\n" + 
-        "Create a slice object.  This is used for extended slicing (e.g. a[0:10:2]).";
-
-    public final static String slice___format___doc = 
-        "default object formatter";
-
-    public final static String slice___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String slice___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String slice___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String slice___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String slice___reduce___doc = 
-        "Return state information for pickling.";
-
-    public final static String slice___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String slice___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String slice___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String slice___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String slice___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String slice___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String slice_indices_doc = 
-        "S.indices(len) -> (start, stop, stride)\n" + 
-        "\n" + 
-        "Assuming a sequence of length len, calculate the start and stop\n" + 
-        "indices, and the stride length of the extended slice described by\n" + 
-        "S. Out of bounds indices are clipped in a manner consistent with the\n" + 
-        "handling of normal slices.";
-
-    public final static String slice_start_doc = 
-        "";
-
-    public final static String slice_step_doc = 
-        "";
-
-    public final static String slice_stop_doc = 
-        "";
-
-    // Docs for <type 'super'>
-    public final static String super___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String super___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String super_doc = 
-        "super(type) -> unbound super object\n" + 
-        "super(type, obj) -> bound super object; requires isinstance(obj, type)\n" + 
-        "super(type, type2) -> bound super object; requires issubclass(type2, type)\n" + 
-        "Typical use to call a cooperative superclass method:\n" + 
-        "class C(B):\n" + 
-        "    def meth(self, arg):\n" + 
-        "        super(C, self).meth(arg)";
-
-    public final static String super___format___doc = 
-        "default object formatter";
-
-    public final static String super___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String super___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String super___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String super___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String super___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String super___reduce___doc = 
-        "helper for pickle";
-
-    public final static String super___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String super___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String super___self___doc = 
-        "the instance invoking super(); may be None";
-
-    public final static String super___self_class___doc = 
-        "the type of the instance invoking super(); may be None";
-
-    public final static String super___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String super___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String super___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String super___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String super___thisclass___doc = 
-        "the class invoking super()";
-
-    // Docs for <type 'staticmethod'>
-    public final static String staticmethod___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String staticmethod___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String staticmethod_doc = 
-        "staticmethod(function) -> method\n" + 
-        "\n" + 
-        "Convert a function to be a static method.\n" + 
-        "\n" + 
-        "A static method does not receive an implicit first argument.\n" + 
-        "To declare a static method, use this idiom:\n" + 
-        "\n" + 
-        "     class C:\n" + 
-        "     def f(arg1, arg2, ...): ...\n" + 
-        "     f = staticmethod(f)\n" + 
-        "\n" + 
-        "It can be called either on the class (e.g. C.f()) or on an instance\n" + 
-        "(e.g. C().f()).  The instance is ignored except for its class.\n" + 
-        "\n" + 
-        "Static methods in Python are similar to those found in Java or C++.\n" + 
-        "For a more advanced concept, see the classmethod builtin.";
-
-    public final static String staticmethod___format___doc = 
-        "default object formatter";
-
-    public final static String staticmethod___func___doc = 
-        "";
-
-    public final static String staticmethod___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String staticmethod___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String staticmethod___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String staticmethod___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String staticmethod___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String staticmethod___reduce___doc = 
-        "helper for pickle";
-
-    public final static String staticmethod___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String staticmethod___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String staticmethod___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String staticmethod___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String staticmethod___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String staticmethod___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    // Docs for <type 'float'>
-    public final static String float___abs___doc = 
-        "x.__abs__() <==> abs(x)";
-
-    public final static String float___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String float___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String float___coerce___doc = 
-        "x.__coerce__(y) <==> coerce(x, y)";
-
-    public final static String float___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String float___div___doc = 
-        "x.__div__(y) <==> x/y";
-
-    public final static String float___divmod___doc = 
-        "x.__divmod__(y) <==> divmod(x, y)";
-
-    public final static String float_doc = 
-        "float(x) -> floating point number\n" + 
-        "\n" + 
-        "Convert a string or number to a floating point number, if possible.";
-
-    public final static String float___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String float___float___doc = 
-        "x.__float__() <==> float(x)";
-
-    public final static String float___floordiv___doc = 
-        "x.__floordiv__(y) <==> x//y";
-
-    public final static String float___format___doc = 
-        "float.__format__(format_spec) -> string\n" + 
-        "\n" + 
-        "Formats the float according to format_spec.";
-
-    public final static String float___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String float___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String float___getformat___doc = 
-        "float.__getformat__(typestr) -> string\n" + 
-        "\n" + 
-        "You probably don't want to use this function.  It exists mainly to be\n" + 
-        "used in Python's test suite.\n" + 
-        "\n" + 
-        "typestr must be 'double' or 'float'.  This function returns whichever of\n" + 
-        "'unknown', 'IEEE, big-endian' or 'IEEE, little-endian' best describes the\n" + 
-        "format of floating point numbers used by the C type named by typestr.";
-
-    public final static String float___getnewargs___doc = 
-        "";
-
-    public final static String float___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String float___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String float___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String float___int___doc = 
-        "x.__int__() <==> int(x)";
-
-    public final static String float___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String float___long___doc = 
-        "x.__long__() <==> long(x)";
-
-    public final static String float___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String float___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String float___mul___doc = 
-        "x.__mul__(y) <==> x*y";
-
-    public final static String float___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String float___neg___doc = 
-        "x.__neg__() <==> -x";
-
-    public final static String float___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String float___nonzero___doc = 
-        "x.__nonzero__() <==> x != 0";
-
-    public final static String float___pos___doc = 
-        "x.__pos__() <==> +x";
-
-    public final static String float___pow___doc = 
-        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
-
-    public final static String float___radd___doc = 
-        "x.__radd__(y) <==> y+x";
-
-    public final static String float___rdiv___doc = 
-        "x.__rdiv__(y) <==> y/x";
-
-    public final static String float___rdivmod___doc = 
-        "x.__rdivmod__(y) <==> divmod(y, x)";
-
-    public final static String float___reduce___doc = 
-        "helper for pickle";
-
-    public final static String float___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String float___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String float___rfloordiv___doc = 
-        "x.__rfloordiv__(y) <==> y//x";
-
-    public final static String float___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String float___rmul___doc = 
-        "x.__rmul__(y) <==> y*x";
-
-    public final static String float___rpow___doc = 
-        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
-
-    public final static String float___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String float___rtruediv___doc = 
-        "x.__rtruediv__(y) <==> y/x";
-
-    public final static String float___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String float___setformat___doc = 
-        "float.__setformat__(typestr, fmt) -> None\n" + 
-        "\n" + 
-        "You probably don't want to use this function.  It exists mainly to be\n" + 
-        "used in Python's test suite.\n" + 
-        "\n" + 
-        "typestr must be 'double' or 'float'.  fmt must be one of 'unknown',\n" + 
-        "'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be\n" + 
-        "one of the latter two if it appears to match the underlying C reality.\n" + 
-        "\n" + 
-        "Overrides the automatic determination of C-level floating point type.\n" + 
-        "This affects how floats are converted to and from binary strings.";
-
-    public final static String float___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String float___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String float___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String float___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String float___truediv___doc = 
-        "x.__truediv__(y) <==> x/y";
-
-    public final static String float___trunc___doc = 
-        "Returns the Integral closest to x between 0 and x.";
-
-    public final static String float_as_integer_ratio_doc = 
-        "float.as_integer_ratio() -> (int, int)\n" + 
-        "\n" + 
-        "Returns a pair of integers, whose ratio is exactly equal to the original\n" + 
-        "float and with a positive denominator.\n" + 
-        "Raises OverflowError on infinities and a ValueError on NaNs.\n" + 
-        "\n" + 
-        ">>> (10.0).as_integer_ratio()\n" + 
-        "(10, 1)\n" + 
-        ">>> (0.0).as_integer_ratio()\n" + 
-        "(0, 1)\n" + 
-        ">>> (-.25).as_integer_ratio()\n" + 
-        "(-1, 4)";
-
-    public final static String float_conjugate_doc = 
-        "Returns self, the complex conjugate of any float.";
-
-    public final static String float_fromhex_doc = 
-        "float.fromhex(string) -> float\n" + 
-        "\n" + 
-        "Create a floating-point number from a hexadecimal string.\n" + 
-        ">>> float.fromhex('0x1.ffffp10')\n" + 
-        "2047.984375\n" + 
-        ">>> float.fromhex('-0x1p-1074')\n" + 
-        "-4.9406564584124654e-324";
-
-    public final static String float_hex_doc = 
-        "float.hex() -> string\n" + 
-        "\n" + 
-        "Return a hexadecimal representation of a floating-point number.\n" + 
-        ">>> (-0.1).hex()\n" + 
-        "'-0x1.999999999999ap-4'\n" + 
-        ">>> 3.14159.hex()\n" + 
-        "'0x1.921f9f01b866ep+1'";
-
-    public final static String float_imag_doc = 
-        "the imaginary part of a complex number";
-
-    public final static String float_is_integer_doc = 
-        "Returns True if the float is an integer.";
-
-    public final static String float_real_doc = 
-        "the real part of a complex number";
-
-    // Docs for <type 'enumerate'>
-    public final static String enumerate___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String enumerate___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String enumerate_doc = 
-        "enumerate(iterable[, start]) -> iterator for index, value of iterable\n" + 
-        "\n" + 
-        "Return an enumerate object.  iterable must be another object that supports\n" + 
-        "iteration.  The enumerate object yields pairs containing a count (from\n" + 
-        "start, which defaults to zero) and a value yielded by the iterable argument.\n" + 
-        "enumerate is useful for obtaining an indexed list:\n" + 
-        "    (0, seq[0]), (1, seq[1]), (2, seq[2]), ...";
-
-    public final static String enumerate___format___doc = 
-        "default object formatter";
-
-    public final static String enumerate___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String enumerate___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String enumerate___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String enumerate___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String enumerate___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String enumerate___reduce___doc = 
-        "helper for pickle";
-
-    public final static String enumerate___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String enumerate___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String enumerate___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String enumerate___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String enumerate___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String enumerate___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String enumerate_next_doc = 
-        "x.next() -> the next value, or raise StopIteration";
-
-    // Docs for <type 'basestring'>
-    public final static String basestring___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String basestring___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String basestring_doc = 
-        "Type basestring cannot be instantiated; it is the base for str and unicode.";
-
-    public final static String basestring___format___doc = 
-        "default object formatter";
-
-    public final static String basestring___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String basestring___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String basestring___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String basestring___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String basestring___reduce___doc = 
-        "helper for pickle";
-
-    public final static String basestring___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String basestring___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String basestring___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String basestring___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String basestring___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String basestring___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    // Docs for <type 'long'>
-    public final static String long___abs___doc = 
-        "x.__abs__() <==> abs(x)";
-
-    public final static String long___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String long___and___doc = 
-        "x.__and__(y) <==> x&y";
-
-    public final static String long___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String long___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String long___coerce___doc = 
-        "x.__coerce__(y) <==> coerce(x, y)";
-
-    public final static String long___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String long___div___doc = 
-        "x.__div__(y) <==> x/y";
-
-    public final static String long___divmod___doc = 
-        "x.__divmod__(y) <==> divmod(x, y)";
-
-    public final static String long_doc = 
-        "long(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to a long integer, if possible.  A floating\n" + 
-        "point argument will be truncated towards zero (this does not include a\n" + 
-        "string representation of a floating point number!)  When converting a\n" + 
-        "string, use the optional base.  It is an error to supply a base when\n" + 
-        "converting a non-string.";
-
-    public final static String long___float___doc = 
-        "x.__float__() <==> float(x)";
-
-    public final static String long___floordiv___doc = 
-        "x.__floordiv__(y) <==> x//y";
-
-    public final static String long___format___doc = 
-        "";
-
-    public final static String long___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String long___getnewargs___doc = 
-        "";
-
-    public final static String long___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String long___hex___doc = 
-        "x.__hex__() <==> hex(x)";
-
-    public final static String long___index___doc = 
-        "x[y:z] <==> x[y.__index__():z.__index__()]";
-
-    public final static String long___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String long___int___doc = 
-        "x.__int__() <==> int(x)";
-
-    public final static String long___invert___doc = 
-        "x.__invert__() <==> ~x";
-
-    public final static String long___long___doc = 
-        "x.__long__() <==> long(x)";
-
-    public final static String long___lshift___doc = 
-        "x.__lshift__(y) <==> x<<y";
-
-    public final static String long___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String long___mul___doc = 
-        "x.__mul__(y) <==> x*y";
-
-    public final static String long___neg___doc = 
-        "x.__neg__() <==> -x";
-
-    public final static String long___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String long___nonzero___doc = 
-        "x.__nonzero__() <==> x != 0";
-
-    public final static String long___oct___doc = 
-        "x.__oct__() <==> oct(x)";
-
-    public final static String long___or___doc = 
-        "x.__or__(y) <==> x|y";
-
-    public final static String long___pos___doc = 
-        "x.__pos__() <==> +x";
-
-    public final static String long___pow___doc = 
-        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
-
-    public final static String long___radd___doc = 
-        "x.__radd__(y) <==> y+x";
-
-    public final static String long___rand___doc = 
-        "x.__rand__(y) <==> y&x";
-
-    public final static String long___rdiv___doc = 
-        "x.__rdiv__(y) <==> y/x";
-
-    public final static String long___rdivmod___doc = 
-        "x.__rdivmod__(y) <==> divmod(y, x)";
-
-    public final static String long___reduce___doc = 
-        "helper for pickle";
-
-    public final static String long___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String long___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String long___rfloordiv___doc = 
-        "x.__rfloordiv__(y) <==> y//x";
-
-    public final static String long___rlshift___doc = 
-        "x.__rlshift__(y) <==> y<<x";
-
-    public final static String long___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String long___rmul___doc = 
-        "x.__rmul__(y) <==> y*x";
-
-    public final static String long___ror___doc = 
-        "x.__ror__(y) <==> y|x";
-
-    public final static String long___rpow___doc = 
-        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
-
-    public final static String long___rrshift___doc = 
-        "x.__rrshift__(y) <==> y>>x";
-
-    public final static String long___rshift___doc = 
-        "x.__rshift__(y) <==> x>>y";
-
-    public final static String long___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String long___rtruediv___doc = 
-        "x.__rtruediv__(y) <==> y/x";
-
-    public final static String long___rxor___doc = 
-        "x.__rxor__(y) <==> y^x";
-
-    public final static String long___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String long___sizeof___doc = 
-        "Returns size in memory, in bytes";
-
-    public final static String long___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String long___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String long___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String long___truediv___doc = 
-        "x.__truediv__(y) <==> x/y";
-
-    public final static String long___trunc___doc = 
-        "Truncating an Integral returns itself.";
-
-    public final static String long___xor___doc = 
-        "x.__xor__(y) <==> x^y";
-
-    public final static String long_bit_length_doc = 
-        "long.bit_length() -> int or long\n" + 
-        "\n" + 
-        "Number of bits necessary to represent self in binary.\n" + 
-        ">>> bin(37L)\n" + 
-        "'0b100101'\n" + 
-        ">>> (37L).bit_length()\n" + 
-        "6";
-
-    public final static String long_conjugate_doc = 
-        "Returns self, the complex conjugate of any long.";
-
-    public final static String long_denominator_doc = 
-        "the denominator of a rational number in lowest terms";
-
-    public final static String long_imag_doc = 
-        "the imaginary part of a complex number";
-
-    public final static String long_numerator_doc = 
-        "the numerator of a rational number in lowest terms";
-
-    public final static String long_real_doc = 
-        "the real part of a complex number";
-
-    // Docs for <type 'tuple'>
-    public final static String tuple___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String tuple___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String tuple___contains___doc = 
-        "x.__contains__(y) <==> y in x";
-
-    public final static String tuple___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String tuple_doc = 
-        "tuple() -> empty tuple\n" + 
-        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
-        "\n" + 
-        "If the argument is a tuple, the return value is the same object.";
-
-    public final static String tuple___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String tuple___format___doc = 
-        "default object formatter";
-
-    public final static String tuple___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String tuple___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String tuple___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String tuple___getnewargs___doc = 
-        "";
-
-    public final static String tuple___getslice___doc = 
-        "x.__getslice__(i, j) <==> x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String tuple___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String tuple___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String tuple___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String tuple___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String tuple___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String tuple___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String tuple___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String tuple___mul___doc = 
-        "x.__mul__(n) <==> x*n";
-
-    public final static String tuple___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String tuple___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String tuple___reduce___doc = 
-        "helper for pickle";
-
-    public final static String tuple___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String tuple___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String tuple___rmul___doc = 
-        "x.__rmul__(n) <==> n*x";
-
-    public final static String tuple___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String tuple___sizeof___doc = 
-        "T.__sizeof__() -- size of T in memory, in bytes";
-
-    public final static String tuple___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String tuple___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String tuple_count_doc = 
-        "T.count(value) -> integer -- return number of occurrences of value";
-
-    public final static String tuple_index_doc = 
-        "T.index(value, [start, [stop]]) -> integer -- return first index of value.\n" + 
-        "Raises ValueError if the value is not present.";
-
-    // Docs for <type 'str'>
-    public final static String str___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String str___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String str___contains___doc = 
-        "x.__contains__(y) <==> y in x";
-
-    public final static String str___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String str_doc = 
-        "str(object) -> string\n" + 
-        "\n" + 
-        "Return a nice string representation of the object.\n" + 
-        "If the argument is a string, the return value is the same object.";
-
-    public final static String str___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String str___format___doc = 
-        "S.__format__(format_spec) -> string\n" + 
-        "\n" + 
-        "Return a formatted version of S as described by format_spec.";
-
-    public final static String str___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String str___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String str___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String str___getnewargs___doc = 
-        "";
-
-    public final static String str___getslice___doc = 
-        "x.__getslice__(i, j) <==> x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String str___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String str___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String str___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String str___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String str___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String str___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String str___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String str___mul___doc = 
-        "x.__mul__(n) <==> x*n";
-
-    public final static String str___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String str___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String str___reduce___doc = 
-        "helper for pickle";
-
-    public final static String str___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String str___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String str___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String str___rmul___doc = 
-        "x.__rmul__(n) <==> n*x";
-
-    public final static String str___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String str___sizeof___doc = 
-        "S.__sizeof__() -> size of S in memory, in bytes";
-
-    public final static String str___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String str___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String str__formatter_field_name_split_doc = 
-        "";
-
-    public final static String str__formatter_parser_doc = 
-        "";
-
-    public final static String str_capitalize_doc = 
-        "S.capitalize() -> string\n" + 
-        "\n" + 
-        "Return a copy of the string S with only its first character\n" + 
-        "capitalized.";
-
-    public final static String str_center_doc = 
-        "S.center(width[, fillchar]) -> string\n" + 
-        "\n" + 
-        "Return S centered in a string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space)";
-
-    public final static String str_count_doc = 
-        "S.count(sub[, start[, end]]) -> int\n" + 
-        "\n" + 
-        "Return the number of non-overlapping occurrences of substring sub in\n" + 
-        "string S[start:end].  Optional arguments start and end are interpreted\n" + 
-        "as in slice notation.";
-
-    public final static String str_decode_doc = 
-        "S.decode([encoding[,errors]]) -> object\n" + 
-        "\n" + 
-        "Decodes S using the codec registered for encoding. encoding defaults\n" + 
-        "to the default encoding. errors may be given to set a different error\n" + 
-        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
-        "a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n" + 
-        "as well as any other name registered with codecs.register_error that is\n" + 
-        "able to handle UnicodeDecodeErrors.";
-
-    public final static String str_encode_doc = 
-        "S.encode([encoding[,errors]]) -> object\n" + 
-        "\n" + 
-        "Encodes S using the codec registered for encoding. encoding defaults\n" + 
-        "to the default encoding. errors may be given to set a different error\n" + 
-        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
-        "a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n" + 
-        "'xmlcharrefreplace' as well as any other name registered with\n" + 
-        "codecs.register_error that is able to handle UnicodeEncodeErrors.";
-
-    public final static String str_endswith_doc = 
-        "S.endswith(suffix[, start[, end]]) -> bool\n" + 
-        "\n" + 
-        "Return True if S ends with the specified suffix, False otherwise.\n" + 
-        "With optional start, test S beginning at that position.\n" + 
-        "With optional end, stop comparing S at that position.\n" + 
-        "suffix can also be a tuple of strings to try.";
-
-    public final static String str_expandtabs_doc = 
-        "S.expandtabs([tabsize]) -> string\n" + 
-        "\n" + 
-        "Return a copy of S where all tab characters are expanded using spaces.\n" + 
-        "If tabsize is not given, a tab size of 8 characters is assumed.";
-
-    public final static String str_find_doc = 
-        "S.find(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Return the lowest index in S where substring sub is found,\n" + 
-        "such that sub is contained within s[start:end].  Optional\n" + 
-        "arguments start and end are interpreted as in slice notation.\n" + 
-        "\n" + 
-        "Return -1 on failure.";
-
-    public final static String str_format_doc = 
-        "S.format(*args, **kwargs) -> string\n" + 
-        "\n" + 
-        "Return a formatted version of S, using substitutions from args and kwargs.\n" + 
-        "The substitutions are identified by braces ('{' and '}').";
-
-    public final static String str_index_doc = 
-        "S.index(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Like S.find() but raise ValueError when the substring is not found.";
-
-    public final static String str_isalnum_doc = 
-        "S.isalnum() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are alphanumeric\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String str_isalpha_doc = 
-        "S.isalpha() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are alphabetic\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String str_isdigit_doc = 
-        "S.isdigit() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are digits\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String str_islower_doc = 
-        "S.islower() -> bool\n" + 
-        "\n" + 
-        "Return True if all cased characters in S are lowercase and there is\n" + 
-        "at least one cased character in S, False otherwise.";
-
-    public final static String str_isspace_doc = 
-        "S.isspace() -> bool\n" + 
-        "\n" + 
-        "Return True if all characters in S are whitespace\n" + 
-        "and there is at least one character in S, False otherwise.";
-
-    public final static String str_istitle_doc = 
-        "S.istitle() -> bool\n" + 
-        "\n" + 
-        "Return True if S is a titlecased string and there is at least one\n" + 
-        "character in S, i.e. uppercase characters may only follow uncased\n" + 
-        "characters and lowercase characters only cased ones. Return False\n" + 
-        "otherwise.";
-
-    public final static String str_isupper_doc = 
-        "S.isupper() -> bool\n" + 
-        "\n" + 
-        "Return True if all cased characters in S are uppercase and there is\n" + 
-        "at least one cased character in S, False otherwise.";
-
-    public final static String str_join_doc = 
-        "S.join(iterable) -> string\n" + 
-        "\n" + 
-        "Return a string which is the concatenation of the strings in the\n" + 
-        "iterable.  The separator between elements is S.";
-
-    public final static String str_ljust_doc = 
-        "S.ljust(width[, fillchar]) -> string\n" + 
-        "\n" + 
-        "Return S left-justified in a string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space).";
-
-    public final static String str_lower_doc = 
-        "S.lower() -> string\n" + 
-        "\n" + 
-        "Return a copy of the string S converted to lowercase.";
-
-    public final static String str_lstrip_doc = 
-        "S.lstrip([chars]) -> string or unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with leading whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is unicode, S will be converted to unicode before stripping";
-
-    public final static String str_partition_doc = 
-        "S.partition(sep) -> (head, sep, tail)\n" + 
-        "\n" + 
-        "Search for the separator sep in S, and return the part before it,\n" + 
-        "the separator itself, and the part after it.  If the separator is not\n" + 
-        "found, return S and two empty strings.";
-
-    public final static String str_replace_doc = 
-        "S.replace(old, new[, count]) -> string\n" + 
-        "\n" + 
-        "Return a copy of string S with all occurrences of substring\n" + 
-        "old replaced by new.  If the optional argument count is\n" + 
-        "given, only the first count occurrences are replaced.";
-
-    public final static String str_rfind_doc = 
-        "S.rfind(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Return the highest index in S where substring sub is found,\n" + 
-        "such that sub is contained within s[start:end].  Optional\n" + 
-        "arguments start and end are interpreted as in slice notation.\n" + 
-        "\n" + 
-        "Return -1 on failure.";
-
-    public final static String str_rindex_doc = 
-        "S.rindex(sub [,start [,end]]) -> int\n" + 
-        "\n" + 
-        "Like S.rfind() but raise ValueError when the substring is not found.";
-
-    public final static String str_rjust_doc = 
-        "S.rjust(width[, fillchar]) -> string\n" + 
-        "\n" + 
-        "Return S right-justified in a string of length width. Padding is\n" + 
-        "done using the specified fill character (default is a space)";
-
-    public final static String str_rpartition_doc = 
-        "S.rpartition(sep) -> (head, sep, tail)\n" + 
-        "\n" + 
-        "Search for the separator sep in S, starting at the end of S, and return\n" + 
-        "the part before it, the separator itself, and the part after it.  If the\n" + 
-        "separator is not found, return two empty strings and S.";
-
-    public final static String str_rsplit_doc = 
-        "S.rsplit([sep [,maxsplit]]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the words in the string S, using sep as the\n" + 
-        "delimiter string, starting at the end of the string and working\n" + 
-        "to the front.  If maxsplit is given, at most maxsplit splits are\n" + 
-        "done. If sep is not specified or is None, any whitespace string\n" + 
-        "is a separator.";
-
-    public final static String str_rstrip_doc = 
-        "S.rstrip([chars]) -> string or unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with trailing whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is unicode, S will be converted to unicode before stripping";
-
-    public final static String str_split_doc = 
-        "S.split([sep [,maxsplit]]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the words in the string S, using sep as the\n" + 
-        "delimiter string.  If maxsplit is given, at most maxsplit\n" + 
-        "splits are done. If sep is not specified or is None, any\n" + 
-        "whitespace string is a separator and empty strings are removed\n" + 
-        "from the result.";
-
-    public final static String str_splitlines_doc = 
-        "S.splitlines([keepends]) -> list of strings\n" + 
-        "\n" + 
-        "Return a list of the lines in S, breaking at line boundaries.\n" + 
-        "Line breaks are not included in the resulting list unless keepends\n" + 
-        "is given and true.";
-
-    public final static String str_startswith_doc = 
-        "S.startswith(prefix[, start[, end]]) -> bool\n" + 
-        "\n" + 
-        "Return True if S starts with the specified prefix, False otherwise.\n" + 
-        "With optional start, test S beginning at that position.\n" + 
-        "With optional end, stop comparing S at that position.\n" + 
-        "prefix can also be a tuple of strings to try.";
-
-    public final static String str_strip_doc = 
-        "S.strip([chars]) -> string or unicode\n" + 
-        "\n" + 
-        "Return a copy of the string S with leading and trailing\n" + 
-        "whitespace removed.\n" + 
-        "If chars is given and not None, remove characters in chars instead.\n" + 
-        "If chars is unicode, S will be converted to unicode before stripping";
-
-    public final static String str_swapcase_doc = 
-        "S.swapcase() -> string\n" + 
-        "\n" + 
-        "Return a copy of the string S with uppercase characters\n" + 
-        "converted to lowercase and vice versa.";
-
-    public final static String str_title_doc = 
-        "S.title() -> string\n" + 
-        "\n" + 
-        "Return a titlecased version of S, i.e. words start with uppercase\n" + 
-        "characters, all remaining cased characters have lowercase.";
-
-    public final static String str_translate_doc = 
-        "S.translate(table [,deletechars]) -> string\n" + 
-        "\n" + 
-        "Return a copy of the string S, where all characters occurring\n" + 
-        "in the optional argument deletechars are removed, and the\n" + 
-        "remaining characters have been mapped through the given\n" + 
-        "translation table, which must be a string of length 256.";
-
-    public final static String str_upper_doc = 
-        "S.upper() -> string\n" + 
-        "\n" + 
-        "Return a copy of the string S converted to uppercase.";
-
-    public final static String str_zfill_doc = 
-        "S.zfill(width) -> string\n" + 
-        "\n" + 
-        "Pad a numeric string S with zeros on the left, to fill a field\n" + 
-        "of the specified width.  The string S is never truncated.";
-
-    // Docs for <type 'property'>
-    public final static String property___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String property___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String property___delete___doc = 
-        "descr.__delete__(obj)";
-
-    public final static String property_doc = 
-        "property(fget=None, fset=None, fdel=None, doc=None) -> property attribute\n" + 
-        "\n" + 
-        "fget is a function to be used for getting an attribute value, and likewise\n" + 
-        "fset is a function for setting, and fdel a function for del'ing, an\n" + 
-        "attribute.  Typical use is to define a managed attribute x:\n" + 
-        "class C(object):\n" + 
-        "    def getx(self): return self._x\n" + 
-        "    def setx(self, value): self._x = value\n" + 
-        "    def delx(self): del self._x\n" + 
-        "    x = property(getx, setx, delx, \"I'm the 'x' property.\")\n" + 
-        "\n" + 
-        "Decorators make defining new properties or modifying existing ones easy:\n" + 
-        "class C(object):\n" + 
-        "    @property\n" + 
-        "    def x(self): return self._x\n" + 
-        "    @x.setter\n" + 
-        "    def x(self, value): self._x = value\n" + 
-        "    @x.deleter\n" + 
-        "    def x(self): del self._x\n" + 
-        "";
-
-    public final static String property___format___doc = 
-        "default object formatter";
-
-    public final static String property___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String property___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String property___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String property___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String property___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String property___reduce___doc = 
-        "helper for pickle";
-
-    public final static String property___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String property___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String property___set___doc = 
-        "descr.__set__(obj, value)";
-
-    public final static String property___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String property___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String property___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String property___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String property_deleter_doc = 
-        "Descriptor to change the deleter on a property.";
-
-    public final static String property_fdel_doc = 
-        "";
-
-    public final static String property_fget_doc = 
-        "";
-
-    public final static String property_fset_doc = 
-        "";
-
-    public final static String property_getter_doc = 
-        "Descriptor to change the getter on a property.";
-
-    public final static String property_setter_doc = 
-        "Descriptor to change the setter on a property.";
-
-    // Docs for <type 'int'>
-    public final static String int___abs___doc = 
-        "x.__abs__() <==> abs(x)";
-
-    public final static String int___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String int___and___doc = 
-        "x.__and__(y) <==> x&y";
-
-    public final static String int___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String int___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String int___coerce___doc = 
-        "x.__coerce__(y) <==> coerce(x, y)";
-
-    public final static String int___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String int___div___doc = 
-        "x.__div__(y) <==> x/y";
-
-    public final static String int___divmod___doc = 
-        "x.__divmod__(y) <==> divmod(x, y)";
-
-    public final static String int_doc = 
-        "int(x[, base]) -> integer\n" + 
-        "\n" + 
-        "Convert a string or number to an integer, if possible.  A floating point\n" + 
-        "argument will be truncated towards zero (this does not include a string\n" + 
-        "representation of a floating point number!)  When converting a string, use\n" + 
-        "the optional base.  It is an error to supply a base when converting a\n" + 
-        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
-        "string content.  If the argument is outside the integer range a\n" + 
-        "long object will be returned instead.";
-
-    public final static String int___float___doc = 
-        "x.__float__() <==> float(x)";
-
-    public final static String int___floordiv___doc = 
-        "x.__floordiv__(y) <==> x//y";
-
-    public final static String int___format___doc = 
-        "";
-
-    public final static String int___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String int___getnewargs___doc = 
-        "";
-
-    public final static String int___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String int___hex___doc = 
-        "x.__hex__() <==> hex(x)";
-
-    public final static String int___index___doc = 
-        "x[y:z] <==> x[y.__index__():z.__index__()]";
-
-    public final static String int___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String int___int___doc = 
-        "x.__int__() <==> int(x)";
-
-    public final static String int___invert___doc = 
-        "x.__invert__() <==> ~x";
-
-    public final static String int___long___doc = 
-        "x.__long__() <==> long(x)";
-
-    public final static String int___lshift___doc = 
-        "x.__lshift__(y) <==> x<<y";
-
-    public final static String int___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String int___mul___doc = 
-        "x.__mul__(y) <==> x*y";
-
-    public final static String int___neg___doc = 
-        "x.__neg__() <==> -x";
-
-    public final static String int___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String int___nonzero___doc = 
-        "x.__nonzero__() <==> x != 0";
-
-    public final static String int___oct___doc = 
-        "x.__oct__() <==> oct(x)";
-
-    public final static String int___or___doc = 
-        "x.__or__(y) <==> x|y";
-
-    public final static String int___pos___doc = 
-        "x.__pos__() <==> +x";
-
-    public final static String int___pow___doc = 
-        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
-
-    public final static String int___radd___doc = 
-        "x.__radd__(y) <==> y+x";
-
-    public final static String int___rand___doc = 
-        "x.__rand__(y) <==> y&x";
-
-    public final static String int___rdiv___doc = 
-        "x.__rdiv__(y) <==> y/x";
-
-    public final static String int___rdivmod___doc = 
-        "x.__rdivmod__(y) <==> divmod(y, x)";
-
-    public final static String int___reduce___doc = 
-        "helper for pickle";
-
-    public final static String int___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String int___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String int___rfloordiv___doc = 
-        "x.__rfloordiv__(y) <==> y//x";
-
-    public final static String int___rlshift___doc = 
-        "x.__rlshift__(y) <==> y<<x";
-
-    public final static String int___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String int___rmul___doc = 
-        "x.__rmul__(y) <==> y*x";
-
-    public final static String int___ror___doc = 
-        "x.__ror__(y) <==> y|x";
-
-    public final static String int___rpow___doc = 
-        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
-
-    public final static String int___rrshift___doc = 
-        "x.__rrshift__(y) <==> y>>x";
-
-    public final static String int___rshift___doc = 
-        "x.__rshift__(y) <==> x>>y";
-
-    public final static String int___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String int___rtruediv___doc = 
-        "x.__rtruediv__(y) <==> y/x";
-
-    public final static String int___rxor___doc = 
-        "x.__rxor__(y) <==> y^x";
-
-    public final static String int___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String int___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String int___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String int___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String int___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String int___truediv___doc = 
-        "x.__truediv__(y) <==> x/y";
-
-    public final static String int___trunc___doc = 
-        "Truncating an Integral returns itself.";
-
-    public final static String int___xor___doc = 
-        "x.__xor__(y) <==> x^y";
-
-    public final static String int_bit_length_doc = 
-        "int.bit_length() -> int\n" + 
-        "\n" + 
-        "Number of bits necessary to represent self in binary.\n" + 
-        ">>> bin(37)\n" + 
-        "'0b100101'\n" + 
-        ">>> (37).bit_length()\n" + 
-        "6";
-
-    public final static String int_conjugate_doc = 
-        "Returns self, the complex conjugate of any int.";
-
-    public final static String int_denominator_doc = 
-        "the denominator of a rational number in lowest terms";
-
-    public final static String int_imag_doc = 
-        "the imaginary part of a complex number";
-
-    public final static String int_numerator_doc = 
-        "the numerator of a rational number in lowest terms";
-
-    public final static String int_real_doc = 
-        "the real part of a complex number";
-
-    // Docs for <type 'xrange'>
-    public final static String xrange___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String xrange___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String xrange_doc = 
-        "xrange([start,] stop[, step]) -> xrange object\n" + 
-        "\n" + 
-        "Like range(), but instead of returning a list, returns an object that\n" + 
-        "generates the numbers in the range on demand.  For looping, this is \n" + 
-        "slightly faster than range() and more memory efficient.";
-
-    public final static String xrange___format___doc = 
-        "default object formatter";
-
-    public final static String xrange___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String xrange___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String xrange___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String xrange___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String xrange___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String xrange___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String xrange___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String xrange___reduce___doc = 
-        "";
-
-    public final static String xrange___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String xrange___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String xrange___reversed___doc = 
-        "Returns a reverse iterator.";
-
-    public final static String xrange___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String xrange___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String xrange___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String xrange___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    // Docs for <type 'file'>
-    public final static String file___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String file___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String file_doc = 
-        "file(name[, mode[, buffering]]) -> file object\n" + 
-        "\n" + 
-        "Open a file.  The mode can be 'r', 'w' or 'a' for reading (default),\n" + 
-        "writing or appending.  The file will be created if it doesn't exist\n" + 
-        "when opened for writing or appending; it will be truncated when\n" + 
-        "opened for writing.  Add a 'b' to the mode for binary files.\n" + 
-        "Add a '+' to the mode to allow simultaneous reading and writing.\n" + 
-        "If the buffering argument is given, 0 means unbuffered, 1 means line\n" + 
-        "buffered, and larger numbers specify the buffer size.  The preferred way\n" + 
-        "to open a file is with the builtin open() function.\n" + 
-        "Add a 'U' to mode to open the file for input with universal newline\n" + 
-        "support.  Any line ending in the input file will be seen as a '\\n'\n" + 
-        "in Python.  Also, a file so opened gains the attribute 'newlines';\n" + 
-        "the value for this attribute is one of None (no newline read yet),\n" + 
-        "'\\r', '\\n', '\\r\\n' or a tuple containing all the newline types seen.\n" + 
-        "\n" + 
-        "'U' cannot be combined with 'w' or '+' mode.\n" + 
-        "";
-
-    public final static String file___enter___doc = 
-        "__enter__() -> self.";
-
-    public final static String file___exit___doc = 
-        "__exit__(*excinfo) -> None.  Closes the file.";
-
-    public final static String file___format___doc = 
-        "default object formatter";
-
-    public final static String file___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String file___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String file___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String file___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String file___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String file___reduce___doc = 
-        "helper for pickle";
-
-    public final static String file___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String file___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String file___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String file___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String file___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String file___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String file_close_doc = 
-        "close() -> None or (perhaps) an integer.  Close the file.\n" + 
-        "\n" + 
-        "Sets data attribute .closed to True.  A closed file cannot be used for\n" + 
-        "further I/O operations.  close() may be called more than once without\n" + 
-        "error.  Some kinds of file objects (for example, opened by popen())\n" + 
-        "may return an exit status upon closing.";
-
-    public final static String file_closed_doc = 
-        "True if the file is closed";
-
-    public final static String file_encoding_doc = 
-        "file encoding";
-
-    public final static String file_errors_doc = 
-        "Unicode error handler";
-
-    public final static String file_fileno_doc = 
-        "fileno() -> integer \"file descriptor\".\n" + 
-        "\n" + 
-        "This is needed for lower-level file interfaces, such os.read().";
-
-    public final static String file_flush_doc = 
-        "flush() -> None.  Flush the internal I/O buffer.";
-
-    public final static String file_isatty_doc = 
-        "isatty() -> true or false.  True if the file is connected to a tty device.";
-
-    public final static String file_mode_doc = 
-        "file mode ('r', 'U', 'w', 'a', possibly with 'b' or '+' added)";
-
-    public final static String file_name_doc = 
-        "file name";
-
-    public final static String file_newlines_doc = 
-        "end-of-line convention used in this file";
-
-    public final static String file_next_doc = 
-        "x.next() -> the next value, or raise StopIteration";
-
-    public final static String file_read_doc = 
-        "read([size]) -> read at most size bytes, returned as a string.\n" + 
-        "\n" + 
-        "If the size argument is negative or omitted, read until EOF is reached.\n" + 
-        "Notice that when in non-blocking mode, less data than what was requested\n" + 
-        "may be returned, even if no size parameter was given.";
-
-    public final static String file_readinto_doc = 
-        "readinto() -> Undocumented.  Don't use this; it may go away.";
-
-    public final static String file_readline_doc = 
-        "readline([size]) -> next line from the file, as a string.\n" + 
-        "\n" + 
-        "Retain newline.  A non-negative size argument limits the maximum\n" + 
-        "number of bytes to return (an incomplete line may be returned then).\n" + 
-        "Return an empty string at EOF.";
-
-    public final static String file_readlines_doc = 
-        "readlines([size]) -> list of strings, each a line from the file.\n" + 
-        "\n" + 
-        "Call readline() repeatedly and return a list of the lines so read.\n" + 
-        "The optional size argument, if given, is an approximate bound on the\n" + 
-        "total number of bytes in the lines returned.";
-
-    public final static String file_seek_doc = 
-        "seek(offset[, whence]) -> None.  Move to new file position.\n" + 
-        "\n" + 
-        "Argument offset is a byte count.  Optional argument whence defaults to\n" + 
-        "0 (offset from start of file, offset should be >= 0); other values are 1\n" + 
-        "(move relative to current position, positive or negative), and 2 (move\n" + 
-        "relative to end of file, usually negative, although many platforms allow\n" + 
-        "seeking beyond the end of a file).  If the file is opened in text mode,\n" + 
-        "only offsets returned by tell() are legal.  Use of other offsets causes\n" + 
-        "undefined behavior.\n" + 
-        "Note that not all file objects are seekable.";
-
-    public final static String file_softspace_doc = 
-        "flag indicating that a space needs to be printed; used by print";
-
-    public final static String file_tell_doc = 
-        "tell() -> current file position, an integer (may be a long integer).";
-
-    public final static String file_truncate_doc = 
-        "truncate([size]) -> None.  Truncate the file to at most size bytes.\n" + 
-        "\n" + 
-        "Size defaults to the current file position, as returned by tell().";
-
-    public final static String file_write_doc = 
-        "write(str) -> None.  Write string str to file.\n" + 
-        "\n" + 
-        "Note that due to buffering, flush() or close() may be needed before\n" + 
-        "the file on disk reflects the data written.";
-
-    public final static String file_writelines_doc = 
-        "writelines(sequence_of_strings) -> None.  Write the strings to the file.\n" + 
-        "\n" + 
-        "Note that newlines are not added.  The sequence can be any iterable object\n" + 
-        "producing strings. This is equivalent to calling write() for each string.";
-
-    public final static String file_xreadlines_doc = 
-        "xreadlines() -> returns self.\n" + 
-        "\n" + 
-        "For backward compatibility. File objects now include the performance\n" + 
-        "optimizations previously implemented in the xreadlines module.";
-
-    // Docs for <type 'complex'>
-    public final static String complex___abs___doc = 
-        "x.__abs__() <==> abs(x)";
-
-    public final static String complex___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String complex___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String complex___coerce___doc = 
-        "x.__coerce__(y) <==> coerce(x, y)";
-
-    public final static String complex___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String complex___div___doc = 
-        "x.__div__(y) <==> x/y";
-
-    public final static String complex___divmod___doc = 
-        "x.__divmod__(y) <==> divmod(x, y)";
-
-    public final static String complex_doc = 
-        "complex(real[, imag]) -> complex number\n" + 
-        "\n" + 
-        "Create a complex number from a real part and an optional imaginary part.\n" + 
-        "This is equivalent to (real + imag*1j) where imag defaults to 0.";
-
-    public final static String complex___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String complex___float___doc = 
-        "x.__float__() <==> float(x)";
-
-    public final static String complex___floordiv___doc = 
-        "x.__floordiv__(y) <==> x//y";
-
-    public final static String complex___format___doc = 
-        "complex.__format__() -> str\n" + 
-        "\n" + 
-        "Converts to a string according to format_spec.";
-
-    public final static String complex___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String complex___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String complex___getnewargs___doc = 
-        "";
-
-    public final static String complex___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String complex___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String complex___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String complex___int___doc = 
-        "x.__int__() <==> int(x)";
-
-    public final static String complex___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String complex___long___doc = 
-        "x.__long__() <==> long(x)";
-
-    public final static String complex___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String complex___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String complex___mul___doc = 
-        "x.__mul__(y) <==> x*y";
-
-    public final static String complex___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String complex___neg___doc = 
-        "x.__neg__() <==> -x";
-
-    public final static String complex___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String complex___nonzero___doc = 
-        "x.__nonzero__() <==> x != 0";
-
-    public final static String complex___pos___doc = 
-        "x.__pos__() <==> +x";
-
-    public final static String complex___pow___doc = 
-        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
-
-    public final static String complex___radd___doc = 
-        "x.__radd__(y) <==> y+x";
-
-    public final static String complex___rdiv___doc = 
-        "x.__rdiv__(y) <==> y/x";
-
-    public final static String complex___rdivmod___doc = 
-        "x.__rdivmod__(y) <==> divmod(y, x)";
-
-    public final static String complex___reduce___doc = 
-        "helper for pickle";
-
-    public final static String complex___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String complex___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String complex___rfloordiv___doc = 
-        "x.__rfloordiv__(y) <==> y//x";
-
-    public final static String complex___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String complex___rmul___doc = 
-        "x.__rmul__(y) <==> y*x";
-
-    public final static String complex___rpow___doc = 
-        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
-
-    public final static String complex___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String complex___rtruediv___doc = 
-        "x.__rtruediv__(y) <==> y/x";
-
-    public final static String complex___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String complex___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String complex___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String complex___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String complex___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String complex___truediv___doc = 
-        "x.__truediv__(y) <==> x/y";
-
-    public final static String complex_conjugate_doc = 
-        "complex.conjugate() -> complex\n" + 
-        "\n" + 
-        "Returns the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.";
-
-    public final static String complex_imag_doc = 
-        "the imaginary part of a complex number";
-
-    public final static String complex_real_doc = 
-        "the real part of a complex number";
-
-    // Docs for <type 'bool'>
-    public final static String bool___abs___doc = 
-        "x.__abs__() <==> abs(x)";
-
-    public final static String bool___add___doc = 
-        "x.__add__(y) <==> x+y";
-
-    public final static String bool___and___doc = 
-        "x.__and__(y) <==> x&y";
-
-    public final static String bool___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String bool___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String bool___coerce___doc = 
-        "x.__coerce__(y) <==> coerce(x, y)";
-
-    public final static String bool___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String bool___div___doc = 
-        "x.__div__(y) <==> x/y";
-
-    public final static String bool___divmod___doc = 
-        "x.__divmod__(y) <==> divmod(x, y)";
-
-    public final static String bool_doc = 
-        "bool(x) -> bool\n" + 
-        "\n" + 
-        "Returns True when the argument x is true, False otherwise.\n" + 
-        "The builtins True and False are the only two instances of the class bool.\n" + 
-        "The class bool is a subclass of the class int, and cannot be subclassed.";
-
-    public final static String bool___float___doc = 
-        "x.__float__() <==> float(x)";
-
-    public final static String bool___floordiv___doc = 
-        "x.__floordiv__(y) <==> x//y";
-
-    public final static String bool___format___doc = 
-        "";
-
-    public final static String bool___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String bool___getnewargs___doc = 
-        "";
-
-    public final static String bool___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String bool___hex___doc = 
-        "x.__hex__() <==> hex(x)";
-
-    public final static String bool___index___doc = 
-        "x[y:z] <==> x[y.__index__():z.__index__()]";
-
-    public final static String bool___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String bool___int___doc = 
-        "x.__int__() <==> int(x)";
-
-    public final static String bool___invert___doc = 
-        "x.__invert__() <==> ~x";
-
-    public final static String bool___long___doc = 
-        "x.__long__() <==> long(x)";
-
-    public final static String bool___lshift___doc = 
-        "x.__lshift__(y) <==> x<<y";
-
-    public final static String bool___mod___doc = 
-        "x.__mod__(y) <==> x%y";
-
-    public final static String bool___mul___doc = 
-        "x.__mul__(y) <==> x*y";
-
-    public final static String bool___neg___doc = 
-        "x.__neg__() <==> -x";
-
-    public final static String bool___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String bool___nonzero___doc = 
-        "x.__nonzero__() <==> x != 0";
-
-    public final static String bool___oct___doc = 
-        "x.__oct__() <==> oct(x)";
-
-    public final static String bool___or___doc = 
-        "x.__or__(y) <==> x|y";
-
-    public final static String bool___pos___doc = 
-        "x.__pos__() <==> +x";
-
-    public final static String bool___pow___doc = 
-        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
-
-    public final static String bool___radd___doc = 
-        "x.__radd__(y) <==> y+x";
-
-    public final static String bool___rand___doc = 
-        "x.__rand__(y) <==> y&x";
-
-    public final static String bool___rdiv___doc = 
-        "x.__rdiv__(y) <==> y/x";
-
-    public final static String bool___rdivmod___doc = 
-        "x.__rdivmod__(y) <==> divmod(y, x)";
-
-    public final static String bool___reduce___doc = 
-        "helper for pickle";
-
-    public final static String bool___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String bool___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String bool___rfloordiv___doc = 
-        "x.__rfloordiv__(y) <==> y//x";
-
-    public final static String bool___rlshift___doc = 
-        "x.__rlshift__(y) <==> y<<x";
-
-    public final static String bool___rmod___doc = 
-        "x.__rmod__(y) <==> y%x";
-
-    public final static String bool___rmul___doc = 
-        "x.__rmul__(y) <==> y*x";
-
-    public final static String bool___ror___doc = 
-        "x.__ror__(y) <==> y|x";
-
-    public final static String bool___rpow___doc = 
-        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
-
-    public final static String bool___rrshift___doc = 
-        "x.__rrshift__(y) <==> y>>x";
-
-    public final static String bool___rshift___doc = 
-        "x.__rshift__(y) <==> x>>y";
-
-    public final static String bool___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String bool___rtruediv___doc = 
-        "x.__rtruediv__(y) <==> y/x";
-
-    public final static String bool___rxor___doc = 
-        "x.__rxor__(y) <==> y^x";
-
-    public final static String bool___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String bool___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String bool___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String bool___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String bool___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String bool___truediv___doc = 
-        "x.__truediv__(y) <==> x/y";
-
-    public final static String bool___trunc___doc = 
-        "Truncating an Integral returns itself.";
-
-    public final static String bool___xor___doc = 
-        "x.__xor__(y) <==> x^y";
-
-    public final static String bool_bit_length_doc = 
-        "int.bit_length() -> int\n" + 
-        "\n" + 
-        "Number of bits necessary to represent self in binary.\n" + 
-        ">>> bin(37)\n" + 
-        "'0b100101'\n" + 
-        ">>> (37).bit_length()\n" + 
-        "6";
-
-    public final static String bool_conjugate_doc = 
-        "Returns self, the complex conjugate of any int.";
-
-    public final static String bool_denominator_doc = 
-        "the denominator of a rational number in lowest terms";
-
-    public final static String bool_imag_doc = 
-        "the imaginary part of a complex number";
-
-    public final static String bool_numerator_doc = 
-        "the numerator of a rational number in lowest terms";
-
-    public final static String bool_real_doc = 
-        "the real part of a complex number";
-
-    // Docs for <type 'classmethod'>
-    public final static String classmethod___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String classmethod___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String classmethod_doc = 
-        "classmethod(function) -> method\n" + 
-        "\n" + 
-        "Convert a function to be a class method.\n" + 
-        "\n" + 
-        "A class method receives the class as implicit first argument,\n" + 
-        "just like an instance method receives the instance.\n" + 
-        "To declare a class method, use this idiom:\n" + 
-        "\n" + 
-        "  class C:\n" + 
-        "      def f(cls, arg1, arg2, ...): ...\n" + 
-        "      f = classmethod(f)\n" + 
-        "\n" + 
-        "It can be called either on the class (e.g. C.f()) or on an instance\n" + 
-        "(e.g. C().f()).  The instance is ignored except for its class.\n" + 
-        "If a class method is called for a derived class, the derived class\n" + 
-        "object is passed as the implied first argument.\n" + 
-        "\n" + 
-        "Class methods are different than C++ or Java static methods.\n" + 
-        "If you want those, see the staticmethod builtin.";
-
-    public final static String classmethod___format___doc = 
-        "default object formatter";
-
-    public final static String classmethod___func___doc = 
-        "";
-
-    public final static String classmethod___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String classmethod___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String classmethod___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String classmethod___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String classmethod___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String classmethod___reduce___doc = 
-        "helper for pickle";
-
-    public final static String classmethod___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String classmethod___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String classmethod___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String classmethod___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String classmethod___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String classmethod___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    // Docs for <type 'set'>
-    public final static String set___and___doc = 
-        "x.__and__(y) <==> x&y";
-
-    public final static String set___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String set___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String set___contains___doc = 
-        "x.__contains__(y) <==> y in x.";
-
-    public final static String set___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String set_doc = 
-        "set() -> new empty set object\n" + 
-        "set(iterable) -> new set object\n" + 
-        "\n" + 
-        "Build an unordered collection of unique elements.";
-
-    public final static String set___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String set___format___doc = 
-        "default object formatter";
-
-    public final static String set___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String set___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String set___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String set___hash___doc = 
-        "";
-
-    public final static String set___iand___doc = 
-        "x.__iand__(y) <==> x&y";
-
-    public final static String set___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String set___ior___doc = 
-        "x.__ior__(y) <==> x|y";
-
-    public final static String set___isub___doc = 
-        "x.__isub__(y) <==> x-y";
-
-    public final static String set___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String set___ixor___doc = 
-        "x.__ixor__(y) <==> x^y";
-
-    public final static String set___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String set___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String set___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String set___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String set___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String set___or___doc = 
-        "x.__or__(y) <==> x|y";
-
-    public final static String set___rand___doc = 
-        "x.__rand__(y) <==> y&x";
-
-    public final static String set___reduce___doc = 
-        "Return state information for pickling.";
-
-    public final static String set___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String set___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String set___ror___doc = 
-        "x.__ror__(y) <==> y|x";
-
-    public final static String set___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String set___rxor___doc = 
-        "x.__rxor__(y) <==> y^x";
-
-    public final static String set___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String set___sizeof___doc = 
-        "S.__sizeof__() -> size of S in memory, in bytes";
-
-    public final static String set___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String set___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String set___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String set___xor___doc = 
-        "x.__xor__(y) <==> x^y";
-
-    public final static String set_add_doc = 
-        "Add an element to a set.\n" + 
-        "\n" + 
-        "This has no effect if the element is already present.";
-
-    public final static String set_clear_doc = 
-        "Remove all elements from this set.";
-
-    public final static String set_copy_doc = 
-        "Return a shallow copy of a set.";
-
-    public final static String set_difference_doc = 
-        "Return the difference of two or more sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in this set but not the others.)";
-
-    public final static String set_difference_update_doc = 
-        "Remove all elements of another set from this set.";
-
-    public final static String set_discard_doc = 
-        "Remove an element from a set if it is a member.\n" + 
-        "\n" + 
-        "If the element is not a member, do nothing.";
-
-    public final static String set_intersection_doc = 
-        "Return the intersection of two or more sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. elements that are common to all of the sets.)";
-
-    public final static String set_intersection_update_doc = 
-        "Update a set with the intersection of itself and another.";
-
-    public final static String set_isdisjoint_doc = 
-        "Return True if two sets have a null intersection.";
-
-    public final static String set_issubset_doc = 
-        "Report whether another set contains this set.";
-
-    public final static String set_issuperset_doc = 
-        "Report whether this set contains another set.";
-
-    public final static String set_pop_doc = 
-        "Remove and return an arbitrary set element.\n" + 
-        "Raises KeyError if the set is empty.";
-
-    public final static String set_remove_doc = 
-        "Remove an element from a set; it must be a member.\n" + 
-        "\n" + 
-        "If the element is not a member, raise a KeyError.";
-
-    public final static String set_symmetric_difference_doc = 
-        "Return the symmetric difference of two sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in exactly one of the sets.)";
-
-    public final static String set_symmetric_difference_update_doc = 
-        "Update a set with the symmetric difference of itself and another.";
-
-    public final static String set_union_doc = 
-        "Return the union of sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in either set.)";
-
-    public final static String set_update_doc = 
-        "Update a set with the union of itself and others.";
-
-    // Docs for <type 'frozenset'>
-    public final static String frozenset___and___doc = 
-        "x.__and__(y) <==> x&y";
-
-    public final static String frozenset___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String frozenset___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String frozenset___contains___doc = 
-        "x.__contains__(y) <==> y in x.";
-
-    public final static String frozenset___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String frozenset_doc = 
-        "frozenset() -> empty frozenset object\n" + 
-        "frozenset(iterable) -> frozenset object\n" + 
-        "\n" + 
-        "Build an immutable unordered collection of unique elements.";
-
-    public final static String frozenset___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String frozenset___format___doc = 
-        "default object formatter";
-
-    public final static String frozenset___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String frozenset___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String frozenset___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String frozenset___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String frozenset___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String frozenset___iter___doc = 
-        "x.__iter__() <==> iter(x)";
-
-    public final static String frozenset___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String frozenset___len___doc = 
-        "x.__len__() <==> len(x)";
-
-    public final static String frozenset___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String frozenset___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String frozenset___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String frozenset___or___doc = 
-        "x.__or__(y) <==> x|y";
-
-    public final static String frozenset___rand___doc = 
-        "x.__rand__(y) <==> y&x";
-
-    public final static String frozenset___reduce___doc = 
-        "Return state information for pickling.";
-
-    public final static String frozenset___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String frozenset___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String frozenset___ror___doc = 
-        "x.__ror__(y) <==> y|x";
-
-    public final static String frozenset___rsub___doc = 
-        "x.__rsub__(y) <==> y-x";
-
-    public final static String frozenset___rxor___doc = 
-        "x.__rxor__(y) <==> y^x";
-
-    public final static String frozenset___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String frozenset___sizeof___doc = 
-        "S.__sizeof__() -> size of S in memory, in bytes";
-
-    public final static String frozenset___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String frozenset___sub___doc = 
-        "x.__sub__(y) <==> x-y";
-
-    public final static String frozenset___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String frozenset___xor___doc = 
-        "x.__xor__(y) <==> x^y";
-
-    public final static String frozenset_copy_doc = 
-        "Return a shallow copy of a set.";
-
-    public final static String frozenset_difference_doc = 
-        "Return the difference of two or more sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in this set but not the others.)";
-
-    public final static String frozenset_intersection_doc = 
-        "Return the intersection of two or more sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. elements that are common to all of the sets.)";
-
-    public final static String frozenset_isdisjoint_doc = 
-        "Return True if two sets have a null intersection.";
-
-    public final static String frozenset_issubset_doc = 
-        "Report whether another set contains this set.";
-
-    public final static String frozenset_issuperset_doc = 
-        "Report whether this set contains another set.";
-
-    public final static String frozenset_symmetric_difference_doc = 
-        "Return the symmetric difference of two sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in exactly one of the sets.)";
-
-    public final static String frozenset_union_doc = 
-        "Return the union of sets as a new set.\n" + 
-        "\n" + 
-        "(i.e. all elements that are in either set.)";
-
-    // Docs for <type 'exceptions.BaseException'>
-    public final static String BaseException___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String BaseException___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String BaseException___dict___doc = 
-        "";
-
-    public final static String BaseException_doc = 
-        "Common base class for all exceptions";
-
-    public final static String BaseException___format___doc = 
-        "default object formatter";
-
-    public final static String BaseException___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String BaseException___getitem___doc = 
-        "x.__getitem__(y) <==> x[y]";
-
-    public final static String BaseException___getslice___doc = 
-        "x.__getslice__(i, j) <==> x[i:j]\n" + 
-        "           \n" + 
-        "           Use of negative indices is not supported.";
-
-    public final static String BaseException___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String BaseException___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String BaseException___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String BaseException___reduce___doc = 
-        "";
-
-    public final static String BaseException___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String BaseException___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String BaseException___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String BaseException___setstate___doc = 
-        "";
-
-    public final static String BaseException___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String BaseException___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String BaseException___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String BaseException___unicode___doc = 
-        "";
-
-    public final static String BaseException_args_doc = 
-        "";
-
-    public final static String BaseException_message_doc = 
-        "";
-
-    // Docs for <type 'function'>
-    public final static String function___call___doc = 
-        "x.__call__(...) <==> x(...)";
-
-    public final static String function___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String function___closure___doc = 
-        "";
-
-    public final static String function___code___doc = 
-        "";
-
-    public final static String function___defaults___doc = 
-        "";
-
-    public final static String function___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String function___dict___doc = 
-        "";
-
-    public final static String function_doc = 
-        "function(code, globals[, name[, argdefs[, closure]]])\n" + 
-        "\n" + 
-        "Create a function object from a code object and a dictionary.\n" + 
-        "The optional name string overrides the name from the code object.\n" + 
-        "The optional argdefs tuple specifies the default argument values.\n" + 
-        "The optional closure tuple supplies the bindings for free variables.";
-
-    public final static String function___format___doc = 
-        "default object formatter";
-
-    public final static String function___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String function___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String function___globals___doc = 
-        "";
-
-    public final static String function___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String function___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String function___module___doc = 
-        "str(object) -> string\n" + 
-        "\n" + 
-        "Return a nice string representation of the object.\n" + 
-        "If the argument is a string, the return value is the same object.";
-
-    public final static String function___name___doc = 
-        "str(object) -> string\n" + 
-        "\n" + 
-        "Return a nice string representation of the object.\n" + 
-        "If the argument is a string, the return value is the same object.";
-
-    public final static String function___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String function___reduce___doc = 
-        "helper for pickle";
-
-    public final static String function___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String function___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String function___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String function___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String function___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String function___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String function_func_closure_doc = 
-        "";
-
-    public final static String function_func_code_doc = 
-        "";
-
-    public final static String function_func_defaults_doc = 
-        "";
-
-    public final static String function_func_dict_doc = 
-        "";
-
-    public final static String function_func_doc_doc = 
-        "";
-
-    public final static String function_func_globals_doc = 
-        "";
-
-    public final static String function_func_name_doc = 
-        "";
-
-    // Docs for <type 'instancemethod'>
-    public final static String instancemethod___call___doc = 
-        "x.__call__(...) <==> x(...)";
-
-    public final static String instancemethod___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String instancemethod___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String instancemethod___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String instancemethod_doc = 
-        "instancemethod(function, instance, class)\n" + 
-        "\n" + 
-        "Create an instance method object.";
-
-    public final static String instancemethod___format___doc = 
-        "default object formatter";
-
-    public final static String instancemethod___func___doc = 
-        "the function (or other callable) implementing a method";
-
-    public final static String instancemethod___get___doc = 
-        "descr.__get__(obj[, type]) -> value";
-
-    public final static String instancemethod___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String instancemethod___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String instancemethod___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String instancemethod___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String instancemethod___reduce___doc = 
-        "helper for pickle";
-
-    public final static String instancemethod___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String instancemethod___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String instancemethod___self___doc = 
-        "the instance to which a method is bound; None for unbound methods";
-
-    public final static String instancemethod___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String instancemethod___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String instancemethod___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String instancemethod___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String instancemethod_im_class_doc = 
-        "the class associated with a method";
-
-    public final static String instancemethod_im_func_doc = 
-        "the function (or other callable) implementing a method";
-
-    public final static String instancemethod_im_self_doc = 
-        "the instance to which a method is bound; None for unbound methods";
-
-    // Docs for <type 'code'>
-    public final static String code___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String code___cmp___doc = 
-        "x.__cmp__(y) <==> cmp(x,y)";
-
-    public final static String code___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String code_doc = 
-        "code(argcount, nlocals, stacksize, flags, codestring, constants, names,\n" + 
-        "      varnames, filename, name, firstlineno, lnotab[, freevars[, cellvars]])\n" + 
-        "\n" + 
-        "Create a code object.  Not for the faint of heart.";
-
-    public final static String code___eq___doc = 
-        "x.__eq__(y) <==> x==y";
-
-    public final static String code___format___doc = 
-        "default object formatter";
-
-    public final static String code___ge___doc = 
-        "x.__ge__(y) <==> x>=y";
-
-    public final static String code___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String code___gt___doc = 
-        "x.__gt__(y) <==> x>y";
-
-    public final static String code___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String code___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String code___le___doc = 
-        "x.__le__(y) <==> x<=y";
-
-    public final static String code___lt___doc = 
-        "x.__lt__(y) <==> x<y";
-
-    public final static String code___ne___doc = 
-        "x.__ne__(y) <==> x!=y";
-
-    public final static String code___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String code___reduce___doc = 
-        "helper for pickle";
-
-    public final static String code___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String code___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String code___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String code___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String code___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String code___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String code_co_argcount_doc = 
-        "";
-
-    public final static String code_co_cellvars_doc = 
-        "";
-
-    public final static String code_co_code_doc = 
-        "";
-
-    public final static String code_co_consts_doc = 
-        "";
-
-    public final static String code_co_filename_doc = 
-        "";
-
-    public final static String code_co_firstlineno_doc = 
-        "";
-
-    public final static String code_co_flags_doc = 
-        "";
-
-    public final static String code_co_freevars_doc = 
-        "";
-
-    public final static String code_co_lnotab_doc = 
-        "";
-
-    public final static String code_co_name_doc = 
-        "";
-
-    public final static String code_co_names_doc = 
-        "";
-
-    public final static String code_co_nlocals_doc = 
-        "";
-
-    public final static String code_co_stacksize_doc = 
-        "";
-
-    public final static String code_co_varnames_doc = 
-        "";
-
-    // Docs for <type 'frame'>
-    public final static String frame___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String frame___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String frame_doc = 
-        "";
-
-    public final static String frame___format___doc = 
-        "default object formatter";
-
-    public final static String frame___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String frame___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String frame___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String frame___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String frame___reduce___doc = 
-        "helper for pickle";
-
-    public final static String frame___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String frame___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String frame___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String frame___sizeof___doc = 
-        "F.__sizeof__() -> size of F in memory, in bytes";
-
-    public final static String frame___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String frame___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String frame_f_back_doc = 
-        "";
-
-    public final static String frame_f_builtins_doc = 
-        "";
-
-    public final static String frame_f_code_doc = 
-        "";
-
-    public final static String frame_f_exc_traceback_doc = 
-        "";
-
-    public final static String frame_f_exc_type_doc = 
-        "";
-
-    public final static String frame_f_exc_value_doc = 
-        "";
-
-    public final static String frame_f_globals_doc = 
-        "";
-
-    public final static String frame_f_lasti_doc = 
-        "";
-
-    public final static String frame_f_lineno_doc = 
-        "";
-
-    public final static String frame_f_locals_doc = 
-        "";
-
-    public final static String frame_f_restricted_doc = 
-        "";
-
-    public final static String frame_f_trace_doc = 
-        "";
-
-    // Docs for <type 'traceback'>
-    public final static String traceback___class___doc = 
-        "type(object) -> the object's type\n" + 
-        "type(name, bases, dict) -> a new type";
-
-    public final static String traceback___delattr___doc = 
-        "x.__delattr__('name') <==> del x.name";
-
-    public final static String traceback_doc = 
-        "";
-
-    public final static String traceback___format___doc = 
-        "default object formatter";
-
-    public final static String traceback___getattribute___doc = 
-        "x.__getattribute__('name') <==> x.name";
-
-    public final static String traceback___hash___doc = 
-        "x.__hash__() <==> hash(x)";
-
-    public final static String traceback___init___doc = 
-        "x.__init__(...) initializes x; see help(type(x)) for signature";
-
-    public final static String traceback___new___doc = 
-        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
-
-    public final static String traceback___reduce___doc = 
-        "helper for pickle";
-
-    public final static String traceback___reduce_ex___doc = 
-        "helper for pickle";
-
-    public final static String traceback___repr___doc = 
-        "x.__repr__() <==> repr(x)";
-
-    public final static String traceback___setattr___doc = 
-        "x.__setattr__('name', value) <==> x.name = value";
-
-    public final static String traceback___sizeof___doc = 
-        "__sizeof__() -> int\n" + 
-        "size of object in memory, in bytes";
-
-    public final static String traceback___str___doc = 
-        "x.__str__() <==> str(x)";
-
-    public final static String traceback___subclasshook___doc = 
-        "Abstract classes can override this to customize issubclass().\n" + 
-        "\n" + 
-        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
-        "It should return True, False or NotImplemented.  If it returns\n" + 
-        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
-        "overrides the normal algorithm (and the outcome is cached).\n" + 
-        "";
-
-    public final static String traceback_tb_frame_doc = 
-        "";
-
-    public final static String traceback_tb_lasti_doc = 
-        "";
-
-    public final static String traceback_tb_lineno_doc = 
-        "";
-
-    public final static String traceback_tb_next_doc = 
-        "";
-
-}
+// generated by make_pydocs.py
+
+package org.python.core;
+
+public class BuiltinDocs {
+
+    // Docs for <type 'object'>
+    public final static String object___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String object___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String object_doc = 
+        "The most base type";
+
+    public final static String object___format___doc = 
+        "default object formatter";
+
+    public final static String object___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String object___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String object___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String object___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String object___reduce___doc = 
+        "helper for pickle";
+
+    public final static String object___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String object___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String object___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String object___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String object___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String object___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    // Docs for <type 'type'>
+    public final static String type___abstractmethods___doc = 
+        "";
+
+    public final static String type___base___doc = 
+        "The most base type";
+
+    public final static String type___bases___doc = 
+        "tuple() -> empty tuple\n" + 
+        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
+        "\n" + 
+        "If the argument is a tuple, the return value is the same object.";
+
+    public final static String type___basicsize___doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String type___call___doc = 
+        "x.__call__(...) <==> x(...)";
+
+    public final static String type___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String type___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String type___dict___doc = 
+        "";
+
+    public final static String type___dictoffset___doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String type_doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String type___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String type___flags___doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String type___format___doc = 
+        "default object formatter";
+
+    public final static String type___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String type___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String type___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String type___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String type___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String type___instancecheck___doc = 
+        "__instancecheck__() -> bool\n" + 
+        "check if an object is an instance";
+
+    public final static String type___itemsize___doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String type___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String type___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String type___module___doc = 
+        "str(object) -> string\n" + 
+        "\n" + 
+        "Return a nice string representation of the object.\n" + 
+        "If the argument is a string, the return value is the same object.";
+
+    public final static String type___mro___doc = 
+        "tuple() -> empty tuple\n" + 
+        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
+        "\n" + 
+        "If the argument is a tuple, the return value is the same object.";
+
+    public final static String type___name___doc = 
+        "str(object) -> string\n" + 
+        "\n" + 
+        "Return a nice string representation of the object.\n" + 
+        "If the argument is a string, the return value is the same object.";
+
+    public final static String type___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String type___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String type___reduce___doc = 
+        "helper for pickle";
+
+    public final static String type___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String type___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String type___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String type___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String type___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String type___subclasscheck___doc = 
+        "__subclasscheck__() -> bool\n" + 
+        "check if a class is a subclass";
+
+    public final static String type___subclasses___doc = 
+        "__subclasses__() -> list of immediate subclasses";
+
+    public final static String type___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String type___weakrefoffset___doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String type_mro_doc = 
+        "mro() -> list\n" + 
+        "return a type's method resolution order";
+
+    // Docs for <type 'unicode'>
+    public final static String unicode___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String unicode___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String unicode___contains___doc = 
+        "x.__contains__(y) <==> y in x";
+
+    public final static String unicode___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String unicode_doc = 
+        "unicode(string [, encoding[, errors]]) -> object\n" + 
+        "\n" + 
+        "Create a new Unicode object from the given encoded string.\n" + 
+        "encoding defaults to the current default string encoding.\n" + 
+        "errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.";
+
+    public final static String unicode___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String unicode___format___doc = 
+        "S.__format__(format_spec) -> unicode\n" + 
+        "\n" + 
+        "Return a formatted version of S as described by format_spec.";
+
+    public final static String unicode___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String unicode___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String unicode___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String unicode___getnewargs___doc = 
+        "";
+
+    public final static String unicode___getslice___doc = 
+        "x.__getslice__(i, j) <==> x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String unicode___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String unicode___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String unicode___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String unicode___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String unicode___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String unicode___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String unicode___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String unicode___mul___doc = 
+        "x.__mul__(n) <==> x*n";
+
+    public final static String unicode___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String unicode___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String unicode___reduce___doc = 
+        "helper for pickle";
+
+    public final static String unicode___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String unicode___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String unicode___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String unicode___rmul___doc = 
+        "x.__rmul__(n) <==> n*x";
+
+    public final static String unicode___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String unicode___sizeof___doc = 
+        "S.__sizeof__() -> size of S in memory, in bytes\n" + 
+        "\n" + 
+        "";
+
+    public final static String unicode___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String unicode___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String unicode__formatter_field_name_split_doc = 
+        "";
+
+    public final static String unicode__formatter_parser_doc = 
+        "";
+
+    public final static String unicode_capitalize_doc = 
+        "S.capitalize() -> unicode\n" + 
+        "\n" + 
+        "Return a capitalized version of S, i.e. make the first character\n" + 
+        "have upper case and the rest lower case.";
+
+    public final static String unicode_center_doc = 
+        "S.center(width[, fillchar]) -> unicode\n" + 
+        "\n" + 
+        "Return S centered in a Unicode string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space)";
+
+    public final static String unicode_count_doc = 
+        "S.count(sub[, start[, end]]) -> int\n" + 
+        "\n" + 
+        "Return the number of non-overlapping occurrences of substring sub in\n" + 
+        "Unicode string S[start:end].  Optional arguments start and end are\n" + 
+        "interpreted as in slice notation.";
+
+    public final static String unicode_decode_doc = 
+        "S.decode([encoding[,errors]]) -> string or unicode\n" + 
+        "\n" + 
+        "Decodes S using the codec registered for encoding. encoding defaults\n" + 
+        "to the default encoding. errors may be given to set a different error\n" + 
+        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
+        "a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n" + 
+        "as well as any other name registerd with codecs.register_error that is\n" + 
+        "able to handle UnicodeDecodeErrors.";
+
+    public final static String unicode_encode_doc = 
+        "S.encode([encoding[,errors]]) -> string or unicode\n" + 
+        "\n" + 
+        "Encodes S using the codec registered for encoding. encoding defaults\n" + 
+        "to the default encoding. errors may be given to set a different error\n" + 
+        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
+        "a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n" + 
+        "'xmlcharrefreplace' as well as any other name registered with\n" + 
+        "codecs.register_error that can handle UnicodeEncodeErrors.";
+
+    public final static String unicode_endswith_doc = 
+        "S.endswith(suffix[, start[, end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if S ends with the specified suffix, False otherwise.\n" + 
+        "With optional start, test S beginning at that position.\n" + 
+        "With optional end, stop comparing S at that position.\n" + 
+        "suffix can also be a tuple of strings to try.";
+
+    public final static String unicode_expandtabs_doc = 
+        "S.expandtabs([tabsize]) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of S where all tab characters are expanded using spaces.\n" + 
+        "If tabsize is not given, a tab size of 8 characters is assumed.";
+
+    public final static String unicode_find_doc = 
+        "S.find(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the lowest index in S where substring sub is found,\n" + 
+        "such that sub is contained within s[start:end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String unicode_format_doc = 
+        "S.format(*args, **kwargs) -> unicode\n" + 
+        "\n" + 
+        "Return a formatted version of S, using substitutions from args and kwargs.\n" + 
+        "The substitutions are identified by braces ('{' and '}').";
+
+    public final static String unicode_index_doc = 
+        "S.index(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like S.find() but raise ValueError when the substring is not found.";
+
+    public final static String unicode_isalnum_doc = 
+        "S.isalnum() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are alphanumeric\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String unicode_isalpha_doc = 
+        "S.isalpha() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are alphabetic\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String unicode_isdecimal_doc = 
+        "S.isdecimal() -> bool\n" + 
+        "\n" + 
+        "Return True if there are only decimal characters in S,\n" + 
+        "False otherwise.";
+
+    public final static String unicode_isdigit_doc = 
+        "S.isdigit() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are digits\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String unicode_islower_doc = 
+        "S.islower() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in S are lowercase and there is\n" + 
+        "at least one cased character in S, False otherwise.";
+
+    public final static String unicode_isnumeric_doc = 
+        "S.isnumeric() -> bool\n" + 
+        "\n" + 
+        "Return True if there are only numeric characters in S,\n" + 
+        "False otherwise.";
+
+    public final static String unicode_isspace_doc = 
+        "S.isspace() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are whitespace\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String unicode_istitle_doc = 
+        "S.istitle() -> bool\n" + 
+        "\n" + 
+        "Return True if S is a titlecased string and there is at least one\n" + 
+        "character in S, i.e. upper- and titlecase characters may only\n" + 
+        "follow uncased characters and lowercase characters only cased ones.\n" + 
+        "Return False otherwise.";
+
+    public final static String unicode_isupper_doc = 
+        "S.isupper() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in S are uppercase and there is\n" + 
+        "at least one cased character in S, False otherwise.";
+
+    public final static String unicode_join_doc = 
+        "S.join(iterable) -> unicode\n" + 
+        "\n" + 
+        "Return a string which is the concatenation of the strings in the\n" + 
+        "iterable.  The separator between elements is S.";
+
+    public final static String unicode_ljust_doc = 
+        "S.ljust(width[, fillchar]) -> int\n" + 
+        "\n" + 
+        "Return S left-justified in a Unicode string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space).";
+
+    public final static String unicode_lower_doc = 
+        "S.lower() -> unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S converted to lowercase.";
+
+    public final static String unicode_lstrip_doc = 
+        "S.lstrip([chars]) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with leading whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is a str, it will be converted to unicode before stripping";
+
+    public final static String unicode_partition_doc = 
+        "S.partition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Search for the separator sep in S, and return the part before it,\n" + 
+        "the separator itself, and the part after it.  If the separator is not\n" + 
+        "found, return S and two empty strings.";
+
+    public final static String unicode_replace_doc = 
+        "S.replace(old, new[, count]) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of S with all occurrences of substring\n" + 
+        "old replaced by new.  If the optional argument count is\n" + 
+        "given, only the first count occurrences are replaced.";
+
+    public final static String unicode_rfind_doc = 
+        "S.rfind(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the highest index in S where substring sub is found,\n" + 
+        "such that sub is contained within s[start:end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String unicode_rindex_doc = 
+        "S.rindex(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like S.rfind() but raise ValueError when the substring is not found.";
+
+    public final static String unicode_rjust_doc = 
+        "S.rjust(width[, fillchar]) -> unicode\n" + 
+        "\n" + 
+        "Return S right-justified in a Unicode string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space).";
+
+    public final static String unicode_rpartition_doc = 
+        "S.rpartition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Search for the separator sep in S, starting at the end of S, and return\n" + 
+        "the part before it, the separator itself, and the part after it.  If the\n" + 
+        "separator is not found, return two empty strings and S.";
+
+    public final static String unicode_rsplit_doc = 
+        "S.rsplit([sep [,maxsplit]]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the words in S, using sep as the\n" + 
+        "delimiter string, starting at the end of the string and\n" + 
+        "working to the front.  If maxsplit is given, at most maxsplit\n" + 
+        "splits are done. If sep is not specified, any whitespace string\n" + 
+        "is a separator.";
+
+    public final static String unicode_rstrip_doc = 
+        "S.rstrip([chars]) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with trailing whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is a str, it will be converted to unicode before stripping";
+
+    public final static String unicode_split_doc = 
+        "S.split([sep [,maxsplit]]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the words in S, using sep as the\n" + 
+        "delimiter string.  If maxsplit is given, at most maxsplit\n" + 
+        "splits are done. If sep is not specified or is None, any\n" + 
+        "whitespace string is a separator and empty strings are\n" + 
+        "removed from the result.";
+
+    public final static String unicode_splitlines_doc = 
+        "S.splitlines([keepends]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the lines in S, breaking at line boundaries.\n" + 
+        "Line breaks are not included in the resulting list unless keepends\n" + 
+        "is given and true.";
+
+    public final static String unicode_startswith_doc = 
+        "S.startswith(prefix[, start[, end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if S starts with the specified prefix, False otherwise.\n" + 
+        "With optional start, test S beginning at that position.\n" + 
+        "With optional end, stop comparing S at that position.\n" + 
+        "prefix can also be a tuple of strings to try.";
+
+    public final static String unicode_strip_doc = 
+        "S.strip([chars]) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with leading and trailing\n" + 
+        "whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is a str, it will be converted to unicode before stripping";
+
+    public final static String unicode_swapcase_doc = 
+        "S.swapcase() -> unicode\n" + 
+        "\n" + 
+        "Return a copy of S with uppercase characters converted to lowercase\n" + 
+        "and vice versa.";
+
+    public final static String unicode_title_doc = 
+        "S.title() -> unicode\n" + 
+        "\n" + 
+        "Return a titlecased version of S, i.e. words start with title case\n" + 
+        "characters, all remaining cased characters have lower case.";
+
+    public final static String unicode_translate_doc = 
+        "S.translate(table) -> unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S, where all characters have been mapped\n" + 
+        "through the given translation table, which must be a mapping of\n" + 
+        "Unicode ordinals to Unicode ordinals, Unicode strings or None.\n" + 
+        "Unmapped characters are left untouched. Characters mapped to None\n" + 
+        "are deleted.";
+
+    public final static String unicode_upper_doc = 
+        "S.upper() -> unicode\n" + 
+        "\n" + 
+        "Return a copy of S converted to uppercase.";
+
+    public final static String unicode_zfill_doc = 
+        "S.zfill(width) -> unicode\n" + 
+        "\n" + 
+        "Pad a numeric string S with zeros on the left, to fill a field\n" + 
+        "of the specified width. The string S is never truncated.";
+
+    // Docs for <type 'dict'>
+    public final static String dict___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String dict___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String dict___contains___doc = 
+        "D.__contains__(k) -> True if D has a key k, else False";
+
+    public final static String dict___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String dict___delitem___doc = 
+        "x.__delitem__(y) <==> del x[y]";
+
+    public final static String dict_doc = 
+        "dict() -> new empty dictionary\n" + 
+        "dict(mapping) -> new dictionary initialized from a mapping object's\n" + 
+        "    (key, value) pairs\n" + 
+        "dict(iterable) -> new dictionary initialized as if via:\n" + 
+        "    d = {}\n" + 
+        "    for k, v in iterable:\n" + 
+        "        d[k] = v\n" + 
+        "dict(**kwargs) -> new dictionary initialized with the name=value pairs\n" + 
+        "    in the keyword argument list.  For example:  dict(one=1, two=2)";
+
+    public final static String dict___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String dict___format___doc = 
+        "default object formatter";
+
+    public final static String dict___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String dict___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String dict___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String dict___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String dict___hash___doc = 
+        "";
+
+    public final static String dict___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String dict___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String dict___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String dict___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String dict___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String dict___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String dict___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String dict___reduce___doc = 
+        "helper for pickle";
+
+    public final static String dict___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String dict___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String dict___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String dict___setitem___doc = 
+        "x.__setitem__(i, y) <==> x[i]=y";
+
+    public final static String dict___sizeof___doc = 
+        "D.__sizeof__() -> size of D in memory, in bytes";
+
+    public final static String dict___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String dict___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String dict_clear_doc = 
+        "D.clear() -> None.  Remove all items from D.";
+
+    public final static String dict_copy_doc = 
+        "D.copy() -> a shallow copy of D";
+
+    public final static String dict_fromkeys_doc = 
+        "dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.\n" + 
+        "v defaults to None.";
+
+    public final static String dict_get_doc = 
+        "D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.";
+
+    public final static String dict_has_key_doc = 
+        "D.has_key(k) -> True if D has a key k, else False";
+
+    public final static String dict_items_doc = 
+        "D.items() -> list of D's (key, value) pairs, as 2-tuples";
+
+    public final static String dict_iteritems_doc = 
+        "D.iteritems() -> an iterator over the (key, value) items of D";
+
+    public final static String dict_iterkeys_doc = 
+        "D.iterkeys() -> an iterator over the keys of D";
+
+    public final static String dict_itervalues_doc = 
+        "D.itervalues() -> an iterator over the values of D";
+
+    public final static String dict_keys_doc = 
+        "D.keys() -> list of D's keys";
+
+    public final static String dict_pop_doc = 
+        "D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n" + 
+        "If key is not found, d is returned if given, otherwise KeyError is raised";
+
+    public final static String dict_popitem_doc = 
+        "D.popitem() -> (k, v), remove and return some (key, value) pair as a\n" + 
+        "2-tuple; but raise KeyError if D is empty.";
+
+    public final static String dict_setdefault_doc = 
+        "D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D";
+
+    public final static String dict_update_doc = 
+        "D.update(E, **F) -> None.  Update D from dict/iterable E and F.\n" + 
+        "If E has a .keys() method, does:     for k in E: D[k] = E[k]\n" + 
+        "If E lacks .keys() method, does:     for (k, v) in E: D[k] = v\n" + 
+        "In either case, this is followed by: for k in F: D[k] = F[k]";
+
+    public final static String dict_values_doc = 
+        "D.values() -> list of D's values";
+
+    public final static String dict_viewitems_doc = 
+        "D.viewitems() -> a set-like object providing a view on D's items";
+
+    public final static String dict_viewkeys_doc = 
+        "D.viewkeys() -> a set-like object providing a view on D's keys";
+
+    public final static String dict_viewvalues_doc = 
+        "D.viewvalues() -> an object providing a view on D's values";
+
+    // Docs for <type 'list'>
+    public final static String list___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String list___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String list___contains___doc = 
+        "x.__contains__(y) <==> y in x";
+
+    public final static String list___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String list___delitem___doc = 
+        "x.__delitem__(y) <==> del x[y]";
+
+    public final static String list___delslice___doc = 
+        "x.__delslice__(i, j) <==> del x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String list_doc = 
+        "list() -> new empty list\n" + 
+        "list(iterable) -> new list initialized from iterable's items";
+
+    public final static String list___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String list___format___doc = 
+        "default object formatter";
+
+    public final static String list___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String list___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String list___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String list___getslice___doc = 
+        "x.__getslice__(i, j) <==> x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String list___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String list___hash___doc = 
+        "";
+
+    public final static String list___iadd___doc = 
+        "x.__iadd__(y) <==> x+=y";
+
+    public final static String list___imul___doc = 
+        "x.__imul__(y) <==> x*=y";
+
+    public final static String list___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String list___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String list___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String list___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String list___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String list___mul___doc = 
+        "x.__mul__(n) <==> x*n";
+
+    public final static String list___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String list___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String list___reduce___doc = 
+        "helper for pickle";
+
+    public final static String list___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String list___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String list___reversed___doc = 
+        "L.__reversed__() -- return a reverse iterator over the list";
+
+    public final static String list___rmul___doc = 
+        "x.__rmul__(n) <==> n*x";
+
+    public final static String list___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String list___setitem___doc = 
+        "x.__setitem__(i, y) <==> x[i]=y";
+
+    public final static String list___setslice___doc = 
+        "x.__setslice__(i, j, y) <==> x[i:j]=y\n" + 
+        "           \n" + 
+        "           Use  of negative indices is not supported.";
+
+    public final static String list___sizeof___doc = 
+        "L.__sizeof__() -- size of L in memory, in bytes";
+
+    public final static String list___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String list___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String list_append_doc = 
+        "L.append(object) -- append object to end";
+
+    public final static String list_count_doc = 
+        "L.count(value) -> integer -- return number of occurrences of value";
+
+    public final static String list_extend_doc = 
+        "L.extend(iterable) -- extend list by appending elements from the iterable";
+
+    public final static String list_index_doc = 
+        "L.index(value, [start, [stop]]) -> integer -- return first index of value.\n" + 
+        "Raises ValueError if the value is not present.";
+
+    public final static String list_insert_doc = 
+        "L.insert(index, object) -- insert object before index";
+
+    public final static String list_pop_doc = 
+        "L.pop([index]) -> item -- remove and return item at index (default last).\n" + 
+        "Raises IndexError if list is empty or index is out of range.";
+
+    public final static String list_remove_doc = 
+        "L.remove(value) -- remove first occurrence of value.\n" + 
+        "Raises ValueError if the value is not present.";
+
+    public final static String list_reverse_doc = 
+        "L.reverse() -- reverse *IN PLACE*";
+
+    public final static String list_sort_doc = 
+        "L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;\n" + 
+        "cmp(x, y) -> -1, 0, 1";
+
+    // Docs for <type 'slice'>
+    public final static String slice___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String slice___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String slice___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String slice_doc = 
+        "slice([start,] stop[, step])\n" + 
+        "\n" + 
+        "Create a slice object.  This is used for extended slicing (e.g. a[0:10:2]).";
+
+    public final static String slice___format___doc = 
+        "default object formatter";
+
+    public final static String slice___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String slice___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String slice___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String slice___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String slice___reduce___doc = 
+        "Return state information for pickling.";
+
+    public final static String slice___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String slice___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String slice___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String slice___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String slice___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String slice___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String slice_indices_doc = 
+        "S.indices(len) -> (start, stop, stride)\n" + 
+        "\n" + 
+        "Assuming a sequence of length len, calculate the start and stop\n" + 
+        "indices, and the stride length of the extended slice described by\n" + 
+        "S. Out of bounds indices are clipped in a manner consistent with the\n" + 
+        "handling of normal slices.";
+
+    public final static String slice_start_doc = 
+        "";
+
+    public final static String slice_step_doc = 
+        "";
+
+    public final static String slice_stop_doc = 
+        "";
+
+    // Docs for <type 'super'>
+    public final static String super___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String super___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String super_doc = 
+        "super(type) -> unbound super object\n" + 
+        "super(type, obj) -> bound super object; requires isinstance(obj, type)\n" + 
+        "super(type, type2) -> bound super object; requires issubclass(type2, type)\n" + 
+        "Typical use to call a cooperative superclass method:\n" + 
+        "class C(B):\n" + 
+        "    def meth(self, arg):\n" + 
+        "        super(C, self).meth(arg)";
+
+    public final static String super___format___doc = 
+        "default object formatter";
+
+    public final static String super___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String super___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String super___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String super___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String super___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String super___reduce___doc = 
+        "helper for pickle";
+
+    public final static String super___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String super___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String super___self___doc = 
+        "the instance invoking super(); may be None";
+
+    public final static String super___self_class___doc = 
+        "the type of the instance invoking super(); may be None";
+
+    public final static String super___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String super___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String super___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String super___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String super___thisclass___doc = 
+        "the class invoking super()";
+
+    // Docs for <type 'staticmethod'>
+    public final static String staticmethod___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String staticmethod___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String staticmethod_doc = 
+        "staticmethod(function) -> method\n" + 
+        "\n" + 
+        "Convert a function to be a static method.\n" + 
+        "\n" + 
+        "A static method does not receive an implicit first argument.\n" + 
+        "To declare a static method, use this idiom:\n" + 
+        "\n" + 
+        "     class C:\n" + 
+        "     def f(arg1, arg2, ...): ...\n" + 
+        "     f = staticmethod(f)\n" + 
+        "\n" + 
+        "It can be called either on the class (e.g. C.f()) or on an instance\n" + 
+        "(e.g. C().f()).  The instance is ignored except for its class.\n" + 
+        "\n" + 
+        "Static methods in Python are similar to those found in Java or C++.\n" + 
+        "For a more advanced concept, see the classmethod builtin.";
+
+    public final static String staticmethod___format___doc = 
+        "default object formatter";
+
+    public final static String staticmethod___func___doc = 
+        "";
+
+    public final static String staticmethod___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String staticmethod___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String staticmethod___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String staticmethod___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String staticmethod___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String staticmethod___reduce___doc = 
+        "helper for pickle";
+
+    public final static String staticmethod___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String staticmethod___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String staticmethod___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String staticmethod___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String staticmethod___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String staticmethod___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    // Docs for <type 'float'>
+    public final static String float___abs___doc = 
+        "x.__abs__() <==> abs(x)";
+
+    public final static String float___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String float___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String float___coerce___doc = 
+        "x.__coerce__(y) <==> coerce(x, y)";
+
+    public final static String float___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String float___div___doc = 
+        "x.__div__(y) <==> x/y";
+
+    public final static String float___divmod___doc = 
+        "x.__divmod__(y) <==> divmod(x, y)";
+
+    public final static String float_doc = 
+        "float(x) -> floating point number\n" + 
+        "\n" + 
+        "Convert a string or number to a floating point number, if possible.";
+
+    public final static String float___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String float___float___doc = 
+        "x.__float__() <==> float(x)";
+
+    public final static String float___floordiv___doc = 
+        "x.__floordiv__(y) <==> x//y";
+
+    public final static String float___format___doc = 
+        "float.__format__(format_spec) -> string\n" + 
+        "\n" + 
+        "Formats the float according to format_spec.";
+
+    public final static String float___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String float___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String float___getformat___doc = 
+        "float.__getformat__(typestr) -> string\n" + 
+        "\n" + 
+        "You probably don't want to use this function.  It exists mainly to be\n" + 
+        "used in Python's test suite.\n" + 
+        "\n" + 
+        "typestr must be 'double' or 'float'.  This function returns whichever of\n" + 
+        "'unknown', 'IEEE, big-endian' or 'IEEE, little-endian' best describes the\n" + 
+        "format of floating point numbers used by the C type named by typestr.";
+
+    public final static String float___getnewargs___doc = 
+        "";
+
+    public final static String float___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String float___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String float___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String float___int___doc = 
+        "x.__int__() <==> int(x)";
+
+    public final static String float___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String float___long___doc = 
+        "x.__long__() <==> long(x)";
+
+    public final static String float___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String float___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String float___mul___doc = 
+        "x.__mul__(y) <==> x*y";
+
+    public final static String float___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String float___neg___doc = 
+        "x.__neg__() <==> -x";
+
+    public final static String float___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String float___nonzero___doc = 
+        "x.__nonzero__() <==> x != 0";
+
+    public final static String float___pos___doc = 
+        "x.__pos__() <==> +x";
+
+    public final static String float___pow___doc = 
+        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
+
+    public final static String float___radd___doc = 
+        "x.__radd__(y) <==> y+x";
+
+    public final static String float___rdiv___doc = 
+        "x.__rdiv__(y) <==> y/x";
+
+    public final static String float___rdivmod___doc = 
+        "x.__rdivmod__(y) <==> divmod(y, x)";
+
+    public final static String float___reduce___doc = 
+        "helper for pickle";
+
+    public final static String float___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String float___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String float___rfloordiv___doc = 
+        "x.__rfloordiv__(y) <==> y//x";
+
+    public final static String float___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String float___rmul___doc = 
+        "x.__rmul__(y) <==> y*x";
+
+    public final static String float___rpow___doc = 
+        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
+
+    public final static String float___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String float___rtruediv___doc = 
+        "x.__rtruediv__(y) <==> y/x";
+
+    public final static String float___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String float___setformat___doc = 
+        "float.__setformat__(typestr, fmt) -> None\n" + 
+        "\n" + 
+        "You probably don't want to use this function.  It exists mainly to be\n" + 
+        "used in Python's test suite.\n" + 
+        "\n" + 
+        "typestr must be 'double' or 'float'.  fmt must be one of 'unknown',\n" + 
+        "'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be\n" + 
+        "one of the latter two if it appears to match the underlying C reality.\n" + 
+        "\n" + 
+        "Overrides the automatic determination of C-level floating point type.\n" + 
+        "This affects how floats are converted to and from binary strings.";
+
+    public final static String float___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String float___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String float___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String float___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String float___truediv___doc = 
+        "x.__truediv__(y) <==> x/y";
+
+    public final static String float___trunc___doc = 
+        "Returns the Integral closest to x between 0 and x.";
+
+    public final static String float_as_integer_ratio_doc = 
+        "float.as_integer_ratio() -> (int, int)\n" + 
+        "\n" + 
+        "Returns a pair of integers, whose ratio is exactly equal to the original\n" + 
+        "float and with a positive denominator.\n" + 
+        "Raises OverflowError on infinities and a ValueError on NaNs.\n" + 
+        "\n" + 
+        ">>> (10.0).as_integer_ratio()\n" + 
+        "(10, 1)\n" + 
+        ">>> (0.0).as_integer_ratio()\n" + 
+        "(0, 1)\n" + 
+        ">>> (-.25).as_integer_ratio()\n" + 
+        "(-1, 4)";
+
+    public final static String float_conjugate_doc = 
+        "Returns self, the complex conjugate of any float.";
+
+    public final static String float_fromhex_doc = 
+        "float.fromhex(string) -> float\n" + 
+        "\n" + 
+        "Create a floating-point number from a hexadecimal string.\n" + 
+        ">>> float.fromhex('0x1.ffffp10')\n" + 
+        "2047.984375\n" + 
+        ">>> float.fromhex('-0x1p-1074')\n" + 
+        "-4.9406564584124654e-324";
+
+    public final static String float_hex_doc = 
+        "float.hex() -> string\n" + 
+        "\n" + 
+        "Return a hexadecimal representation of a floating-point number.\n" + 
+        ">>> (-0.1).hex()\n" + 
+        "'-0x1.999999999999ap-4'\n" + 
+        ">>> 3.14159.hex()\n" + 
+        "'0x1.921f9f01b866ep+1'";
+
+    public final static String float_imag_doc = 
+        "the imaginary part of a complex number";
+
+    public final static String float_is_integer_doc = 
+        "Returns True if the float is an integer.";
+
+    public final static String float_real_doc = 
+        "the real part of a complex number";
+
+    // Docs for <type 'enumerate'>
+    public final static String enumerate___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String enumerate___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String enumerate_doc = 
+        "enumerate(iterable[, start]) -> iterator for index, value of iterable\n" + 
+        "\n" + 
+        "Return an enumerate object.  iterable must be another object that supports\n" + 
+        "iteration.  The enumerate object yields pairs containing a count (from\n" + 
+        "start, which defaults to zero) and a value yielded by the iterable argument.\n" + 
+        "enumerate is useful for obtaining an indexed list:\n" + 
+        "    (0, seq[0]), (1, seq[1]), (2, seq[2]), ...";
+
+    public final static String enumerate___format___doc = 
+        "default object formatter";
+
+    public final static String enumerate___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String enumerate___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String enumerate___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String enumerate___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String enumerate___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String enumerate___reduce___doc = 
+        "helper for pickle";
+
+    public final static String enumerate___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String enumerate___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String enumerate___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String enumerate___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String enumerate___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String enumerate___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String enumerate_next_doc = 
+        "x.next() -> the next value, or raise StopIteration";
+
+    // Docs for <type 'basestring'>
+    public final static String basestring___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String basestring___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String basestring_doc = 
+        "Type basestring cannot be instantiated; it is the base for str and unicode.";
+
+    public final static String basestring___format___doc = 
+        "default object formatter";
+
+    public final static String basestring___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String basestring___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String basestring___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String basestring___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String basestring___reduce___doc = 
+        "helper for pickle";
+
+    public final static String basestring___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String basestring___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String basestring___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String basestring___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String basestring___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String basestring___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    // Docs for <type 'long'>
+    public final static String long___abs___doc = 
+        "x.__abs__() <==> abs(x)";
+
+    public final static String long___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String long___and___doc = 
+        "x.__and__(y) <==> x&y";
+
+    public final static String long___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String long___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String long___coerce___doc = 
+        "x.__coerce__(y) <==> coerce(x, y)";
+
+    public final static String long___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String long___div___doc = 
+        "x.__div__(y) <==> x/y";
+
+    public final static String long___divmod___doc = 
+        "x.__divmod__(y) <==> divmod(x, y)";
+
+    public final static String long_doc = 
+        "long(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to a long integer, if possible.  A floating\n" + 
+        "point argument will be truncated towards zero (this does not include a\n" + 
+        "string representation of a floating point number!)  When converting a\n" + 
+        "string, use the optional base.  It is an error to supply a base when\n" + 
+        "converting a non-string.";
+
+    public final static String long___float___doc = 
+        "x.__float__() <==> float(x)";
+
+    public final static String long___floordiv___doc = 
+        "x.__floordiv__(y) <==> x//y";
+
+    public final static String long___format___doc = 
+        "";
+
+    public final static String long___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String long___getnewargs___doc = 
+        "";
+
+    public final static String long___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String long___hex___doc = 
+        "x.__hex__() <==> hex(x)";
+
+    public final static String long___index___doc = 
+        "x[y:z] <==> x[y.__index__():z.__index__()]";
+
+    public final static String long___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String long___int___doc = 
+        "x.__int__() <==> int(x)";
+
+    public final static String long___invert___doc = 
+        "x.__invert__() <==> ~x";
+
+    public final static String long___long___doc = 
+        "x.__long__() <==> long(x)";
+
+    public final static String long___lshift___doc = 
+        "x.__lshift__(y) <==> x<<y";
+
+    public final static String long___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String long___mul___doc = 
+        "x.__mul__(y) <==> x*y";
+
+    public final static String long___neg___doc = 
+        "x.__neg__() <==> -x";
+
+    public final static String long___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String long___nonzero___doc = 
+        "x.__nonzero__() <==> x != 0";
+
+    public final static String long___oct___doc = 
+        "x.__oct__() <==> oct(x)";
+
+    public final static String long___or___doc = 
+        "x.__or__(y) <==> x|y";
+
+    public final static String long___pos___doc = 
+        "x.__pos__() <==> +x";
+
+    public final static String long___pow___doc = 
+        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
+
+    public final static String long___radd___doc = 
+        "x.__radd__(y) <==> y+x";
+
+    public final static String long___rand___doc = 
+        "x.__rand__(y) <==> y&x";
+
+    public final static String long___rdiv___doc = 
+        "x.__rdiv__(y) <==> y/x";
+
+    public final static String long___rdivmod___doc = 
+        "x.__rdivmod__(y) <==> divmod(y, x)";
+
+    public final static String long___reduce___doc = 
+        "helper for pickle";
+
+    public final static String long___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String long___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String long___rfloordiv___doc = 
+        "x.__rfloordiv__(y) <==> y//x";
+
+    public final static String long___rlshift___doc = 
+        "x.__rlshift__(y) <==> y<<x";
+
+    public final static String long___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String long___rmul___doc = 
+        "x.__rmul__(y) <==> y*x";
+
+    public final static String long___ror___doc = 
+        "x.__ror__(y) <==> y|x";
+
+    public final static String long___rpow___doc = 
+        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
+
+    public final static String long___rrshift___doc = 
+        "x.__rrshift__(y) <==> y>>x";
+
+    public final static String long___rshift___doc = 
+        "x.__rshift__(y) <==> x>>y";
+
+    public final static String long___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String long___rtruediv___doc = 
+        "x.__rtruediv__(y) <==> y/x";
+
+    public final static String long___rxor___doc = 
+        "x.__rxor__(y) <==> y^x";
+
+    public final static String long___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String long___sizeof___doc = 
+        "Returns size in memory, in bytes";
+
+    public final static String long___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String long___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String long___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String long___truediv___doc = 
+        "x.__truediv__(y) <==> x/y";
+
+    public final static String long___trunc___doc = 
+        "Truncating an Integral returns itself.";
+
+    public final static String long___xor___doc = 
+        "x.__xor__(y) <==> x^y";
+
+    public final static String long_bit_length_doc = 
+        "long.bit_length() -> int or long\n" + 
+        "\n" + 
+        "Number of bits necessary to represent self in binary.\n" + 
+        ">>> bin(37L)\n" + 
+        "'0b100101'\n" + 
+        ">>> (37L).bit_length()\n" + 
+        "6";
+
+    public final static String long_conjugate_doc = 
+        "Returns self, the complex conjugate of any long.";
+
+    public final static String long_denominator_doc = 
+        "the denominator of a rational number in lowest terms";
+
+    public final static String long_imag_doc = 
+        "the imaginary part of a complex number";
+
+    public final static String long_numerator_doc = 
+        "the numerator of a rational number in lowest terms";
+
+    public final static String long_real_doc = 
+        "the real part of a complex number";
+
+    // Docs for <type 'tuple'>
+    public final static String tuple___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String tuple___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String tuple___contains___doc = 
+        "x.__contains__(y) <==> y in x";
+
+    public final static String tuple___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String tuple_doc = 
+        "tuple() -> empty tuple\n" + 
+        "tuple(iterable) -> tuple initialized from iterable's items\n" + 
+        "\n" + 
+        "If the argument is a tuple, the return value is the same object.";
+
+    public final static String tuple___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String tuple___format___doc = 
+        "default object formatter";
+
+    public final static String tuple___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String tuple___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String tuple___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String tuple___getnewargs___doc = 
+        "";
+
+    public final static String tuple___getslice___doc = 
+        "x.__getslice__(i, j) <==> x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String tuple___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String tuple___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String tuple___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String tuple___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String tuple___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String tuple___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String tuple___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String tuple___mul___doc = 
+        "x.__mul__(n) <==> x*n";
+
+    public final static String tuple___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String tuple___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String tuple___reduce___doc = 
+        "helper for pickle";
+
+    public final static String tuple___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String tuple___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String tuple___rmul___doc = 
+        "x.__rmul__(n) <==> n*x";
+
+    public final static String tuple___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String tuple___sizeof___doc = 
+        "T.__sizeof__() -- size of T in memory, in bytes";
+
+    public final static String tuple___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String tuple___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String tuple_count_doc = 
+        "T.count(value) -> integer -- return number of occurrences of value";
+
+    public final static String tuple_index_doc = 
+        "T.index(value, [start, [stop]]) -> integer -- return first index of value.\n" + 
+        "Raises ValueError if the value is not present.";
+
+    // Docs for <type 'str'>
+    public final static String str___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String str___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String str___contains___doc = 
+        "x.__contains__(y) <==> y in x";
+
+    public final static String str___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String str_doc = 
+        "str(object) -> string\n" + 
+        "\n" + 
+        "Return a nice string representation of the object.\n" + 
+        "If the argument is a string, the return value is the same object.";
+
+    public final static String str___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String str___format___doc = 
+        "S.__format__(format_spec) -> string\n" + 
+        "\n" + 
+        "Return a formatted version of S as described by format_spec.";
+
+    public final static String str___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String str___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String str___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String str___getnewargs___doc = 
+        "";
+
+    public final static String str___getslice___doc = 
+        "x.__getslice__(i, j) <==> x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String str___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String str___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String str___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String str___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String str___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String str___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String str___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String str___mul___doc = 
+        "x.__mul__(n) <==> x*n";
+
+    public final static String str___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String str___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String str___reduce___doc = 
+        "helper for pickle";
+
+    public final static String str___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String str___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String str___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String str___rmul___doc = 
+        "x.__rmul__(n) <==> n*x";
+
+    public final static String str___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String str___sizeof___doc = 
+        "S.__sizeof__() -> size of S in memory, in bytes";
+
+    public final static String str___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String str___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String str__formatter_field_name_split_doc = 
+        "";
+
+    public final static String str__formatter_parser_doc = 
+        "";
+
+    public final static String str_capitalize_doc = 
+        "S.capitalize() -> string\n" + 
+        "\n" + 
+        "Return a copy of the string S with only its first character\n" + 
+        "capitalized.";
+
+    public final static String str_center_doc = 
+        "S.center(width[, fillchar]) -> string\n" + 
+        "\n" + 
+        "Return S centered in a string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space)";
+
+    public final static String str_count_doc = 
+        "S.count(sub[, start[, end]]) -> int\n" + 
+        "\n" + 
+        "Return the number of non-overlapping occurrences of substring sub in\n" + 
+        "string S[start:end].  Optional arguments start and end are interpreted\n" + 
+        "as in slice notation.";
+
+    public final static String str_decode_doc = 
+        "S.decode([encoding[,errors]]) -> object\n" + 
+        "\n" + 
+        "Decodes S using the codec registered for encoding. encoding defaults\n" + 
+        "to the default encoding. errors may be given to set a different error\n" + 
+        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
+        "a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n" + 
+        "as well as any other name registered with codecs.register_error that is\n" + 
+        "able to handle UnicodeDecodeErrors.";
+
+    public final static String str_encode_doc = 
+        "S.encode([encoding[,errors]]) -> object\n" + 
+        "\n" + 
+        "Encodes S using the codec registered for encoding. encoding defaults\n" + 
+        "to the default encoding. errors may be given to set a different error\n" + 
+        "handling scheme. Default is 'strict' meaning that encoding errors raise\n" + 
+        "a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n" + 
+        "'xmlcharrefreplace' as well as any other name registered with\n" + 
+        "codecs.register_error that is able to handle UnicodeEncodeErrors.";
+
+    public final static String str_endswith_doc = 
+        "S.endswith(suffix[, start[, end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if S ends with the specified suffix, False otherwise.\n" + 
+        "With optional start, test S beginning at that position.\n" + 
+        "With optional end, stop comparing S at that position.\n" + 
+        "suffix can also be a tuple of strings to try.";
+
+    public final static String str_expandtabs_doc = 
+        "S.expandtabs([tabsize]) -> string\n" + 
+        "\n" + 
+        "Return a copy of S where all tab characters are expanded using spaces.\n" + 
+        "If tabsize is not given, a tab size of 8 characters is assumed.";
+
+    public final static String str_find_doc = 
+        "S.find(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the lowest index in S where substring sub is found,\n" + 
+        "such that sub is contained within s[start:end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String str_format_doc = 
+        "S.format(*args, **kwargs) -> string\n" + 
+        "\n" + 
+        "Return a formatted version of S, using substitutions from args and kwargs.\n" + 
+        "The substitutions are identified by braces ('{' and '}').";
+
+    public final static String str_index_doc = 
+        "S.index(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like S.find() but raise ValueError when the substring is not found.";
+
+    public final static String str_isalnum_doc = 
+        "S.isalnum() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are alphanumeric\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String str_isalpha_doc = 
+        "S.isalpha() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are alphabetic\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String str_isdigit_doc = 
+        "S.isdigit() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are digits\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String str_islower_doc = 
+        "S.islower() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in S are lowercase and there is\n" + 
+        "at least one cased character in S, False otherwise.";
+
+    public final static String str_isspace_doc = 
+        "S.isspace() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in S are whitespace\n" + 
+        "and there is at least one character in S, False otherwise.";
+
+    public final static String str_istitle_doc = 
+        "S.istitle() -> bool\n" + 
+        "\n" + 
+        "Return True if S is a titlecased string and there is at least one\n" + 
+        "character in S, i.e. uppercase characters may only follow uncased\n" + 
+        "characters and lowercase characters only cased ones. Return False\n" + 
+        "otherwise.";
+
+    public final static String str_isupper_doc = 
+        "S.isupper() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in S are uppercase and there is\n" + 
+        "at least one cased character in S, False otherwise.";
+
+    public final static String str_join_doc = 
+        "S.join(iterable) -> string\n" + 
+        "\n" + 
+        "Return a string which is the concatenation of the strings in the\n" + 
+        "iterable.  The separator between elements is S.";
+
+    public final static String str_ljust_doc = 
+        "S.ljust(width[, fillchar]) -> string\n" + 
+        "\n" + 
+        "Return S left-justified in a string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space).";
+
+    public final static String str_lower_doc = 
+        "S.lower() -> string\n" + 
+        "\n" + 
+        "Return a copy of the string S converted to lowercase.";
+
+    public final static String str_lstrip_doc = 
+        "S.lstrip([chars]) -> string or unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with leading whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is unicode, S will be converted to unicode before stripping";
+
+    public final static String str_partition_doc = 
+        "S.partition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Search for the separator sep in S, and return the part before it,\n" + 
+        "the separator itself, and the part after it.  If the separator is not\n" + 
+        "found, return S and two empty strings.";
+
+    public final static String str_replace_doc = 
+        "S.replace(old, new[, count]) -> string\n" + 
+        "\n" + 
+        "Return a copy of string S with all occurrences of substring\n" + 
+        "old replaced by new.  If the optional argument count is\n" + 
+        "given, only the first count occurrences are replaced.";
+
+    public final static String str_rfind_doc = 
+        "S.rfind(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the highest index in S where substring sub is found,\n" + 
+        "such that sub is contained within s[start:end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String str_rindex_doc = 
+        "S.rindex(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like S.rfind() but raise ValueError when the substring is not found.";
+
+    public final static String str_rjust_doc = 
+        "S.rjust(width[, fillchar]) -> string\n" + 
+        "\n" + 
+        "Return S right-justified in a string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space)";
+
+    public final static String str_rpartition_doc = 
+        "S.rpartition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Search for the separator sep in S, starting at the end of S, and return\n" + 
+        "the part before it, the separator itself, and the part after it.  If the\n" + 
+        "separator is not found, return two empty strings and S.";
+
+    public final static String str_rsplit_doc = 
+        "S.rsplit([sep [,maxsplit]]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the words in the string S, using sep as the\n" + 
+        "delimiter string, starting at the end of the string and working\n" + 
+        "to the front.  If maxsplit is given, at most maxsplit splits are\n" + 
+        "done. If sep is not specified or is None, any whitespace string\n" + 
+        "is a separator.";
+
+    public final static String str_rstrip_doc = 
+        "S.rstrip([chars]) -> string or unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with trailing whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is unicode, S will be converted to unicode before stripping";
+
+    public final static String str_split_doc = 
+        "S.split([sep [,maxsplit]]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the words in the string S, using sep as the\n" + 
+        "delimiter string.  If maxsplit is given, at most maxsplit\n" + 
+        "splits are done. If sep is not specified or is None, any\n" + 
+        "whitespace string is a separator and empty strings are removed\n" + 
+        "from the result.";
+
+    public final static String str_splitlines_doc = 
+        "S.splitlines([keepends]) -> list of strings\n" + 
+        "\n" + 
+        "Return a list of the lines in S, breaking at line boundaries.\n" + 
+        "Line breaks are not included in the resulting list unless keepends\n" + 
+        "is given and true.";
+
+    public final static String str_startswith_doc = 
+        "S.startswith(prefix[, start[, end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if S starts with the specified prefix, False otherwise.\n" + 
+        "With optional start, test S beginning at that position.\n" + 
+        "With optional end, stop comparing S at that position.\n" + 
+        "prefix can also be a tuple of strings to try.";
+
+    public final static String str_strip_doc = 
+        "S.strip([chars]) -> string or unicode\n" + 
+        "\n" + 
+        "Return a copy of the string S with leading and trailing\n" + 
+        "whitespace removed.\n" + 
+        "If chars is given and not None, remove characters in chars instead.\n" + 
+        "If chars is unicode, S will be converted to unicode before stripping";
+
+    public final static String str_swapcase_doc = 
+        "S.swapcase() -> string\n" + 
+        "\n" + 
+        "Return a copy of the string S with uppercase characters\n" + 
+        "converted to lowercase and vice versa.";
+
+    public final static String str_title_doc = 
+        "S.title() -> string\n" + 
+        "\n" + 
+        "Return a titlecased version of S, i.e. words start with uppercase\n" + 
+        "characters, all remaining cased characters have lowercase.";
+
+    public final static String str_translate_doc = 
+        "S.translate(table [,deletechars]) -> string\n" + 
+        "\n" + 
+        "Return a copy of the string S, where all characters occurring\n" + 
+        "in the optional argument deletechars are removed, and the\n" + 
+        "remaining characters have been mapped through the given\n" + 
+        "translation table, which must be a string of length 256.";
+
+    public final static String str_upper_doc = 
+        "S.upper() -> string\n" + 
+        "\n" + 
+        "Return a copy of the string S converted to uppercase.";
+
+    public final static String str_zfill_doc = 
+        "S.zfill(width) -> string\n" + 
+        "\n" + 
+        "Pad a numeric string S with zeros on the left, to fill a field\n" + 
+        "of the specified width.  The string S is never truncated.";
+
+    // Docs for <type 'property'>
+    public final static String property___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String property___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String property___delete___doc = 
+        "descr.__delete__(obj)";
+
+    public final static String property_doc = 
+        "property(fget=None, fset=None, fdel=None, doc=None) -> property attribute\n" + 
+        "\n" + 
+        "fget is a function to be used for getting an attribute value, and likewise\n" + 
+        "fset is a function for setting, and fdel a function for del'ing, an\n" + 
+        "attribute.  Typical use is to define a managed attribute x:\n" + 
+        "class C(object):\n" + 
+        "    def getx(self): return self._x\n" + 
+        "    def setx(self, value): self._x = value\n" + 
+        "    def delx(self): del self._x\n" + 
+        "    x = property(getx, setx, delx, \"I'm the 'x' property.\")\n" + 
+        "\n" + 
+        "Decorators make defining new properties or modifying existing ones easy:\n" + 
+        "class C(object):\n" + 
+        "    @property\n" + 
+        "    def x(self): return self._x\n" + 
+        "    @x.setter\n" + 
+        "    def x(self, value): self._x = value\n" + 
+        "    @x.deleter\n" + 
+        "    def x(self): del self._x\n" + 
+        "";
+
+    public final static String property___format___doc = 
+        "default object formatter";
+
+    public final static String property___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String property___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String property___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String property___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String property___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String property___reduce___doc = 
+        "helper for pickle";
+
+    public final static String property___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String property___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String property___set___doc = 
+        "descr.__set__(obj, value)";
+
+    public final static String property___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String property___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String property___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String property___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String property_deleter_doc = 
+        "Descriptor to change the deleter on a property.";
+
+    public final static String property_fdel_doc = 
+        "";
+
+    public final static String property_fget_doc = 
+        "";
+
+    public final static String property_fset_doc = 
+        "";
+
+    public final static String property_getter_doc = 
+        "Descriptor to change the getter on a property.";
+
+    public final static String property_setter_doc = 
+        "Descriptor to change the setter on a property.";
+
+    // Docs for <type 'int'>
+    public final static String int___abs___doc = 
+        "x.__abs__() <==> abs(x)";
+
+    public final static String int___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String int___and___doc = 
+        "x.__and__(y) <==> x&y";
+
+    public final static String int___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String int___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String int___coerce___doc = 
+        "x.__coerce__(y) <==> coerce(x, y)";
+
+    public final static String int___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String int___div___doc = 
+        "x.__div__(y) <==> x/y";
+
+    public final static String int___divmod___doc = 
+        "x.__divmod__(y) <==> divmod(x, y)";
+
+    public final static String int_doc = 
+        "int(x[, base]) -> integer\n" + 
+        "\n" + 
+        "Convert a string or number to an integer, if possible.  A floating point\n" + 
+        "argument will be truncated towards zero (this does not include a string\n" + 
+        "representation of a floating point number!)  When converting a string, use\n" + 
+        "the optional base.  It is an error to supply a base when converting a\n" + 
+        "non-string.  If base is zero, the proper base is guessed based on the\n" + 
+        "string content.  If the argument is outside the integer range a\n" + 
+        "long object will be returned instead.";
+
+    public final static String int___float___doc = 
+        "x.__float__() <==> float(x)";
+
+    public final static String int___floordiv___doc = 
+        "x.__floordiv__(y) <==> x//y";
+
+    public final static String int___format___doc = 
+        "";
+
+    public final static String int___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String int___getnewargs___doc = 
+        "";
+
+    public final static String int___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String int___hex___doc = 
+        "x.__hex__() <==> hex(x)";
+
+    public final static String int___index___doc = 
+        "x[y:z] <==> x[y.__index__():z.__index__()]";
+
+    public final static String int___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String int___int___doc = 
+        "x.__int__() <==> int(x)";
+
+    public final static String int___invert___doc = 
+        "x.__invert__() <==> ~x";
+
+    public final static String int___long___doc = 
+        "x.__long__() <==> long(x)";
+
+    public final static String int___lshift___doc = 
+        "x.__lshift__(y) <==> x<<y";
+
+    public final static String int___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String int___mul___doc = 
+        "x.__mul__(y) <==> x*y";
+
+    public final static String int___neg___doc = 
+        "x.__neg__() <==> -x";
+
+    public final static String int___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String int___nonzero___doc = 
+        "x.__nonzero__() <==> x != 0";
+
+    public final static String int___oct___doc = 
+        "x.__oct__() <==> oct(x)";
+
+    public final static String int___or___doc = 
+        "x.__or__(y) <==> x|y";
+
+    public final static String int___pos___doc = 
+        "x.__pos__() <==> +x";
+
+    public final static String int___pow___doc = 
+        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
+
+    public final static String int___radd___doc = 
+        "x.__radd__(y) <==> y+x";
+
+    public final static String int___rand___doc = 
+        "x.__rand__(y) <==> y&x";
+
+    public final static String int___rdiv___doc = 
+        "x.__rdiv__(y) <==> y/x";
+
+    public final static String int___rdivmod___doc = 
+        "x.__rdivmod__(y) <==> divmod(y, x)";
+
+    public final static String int___reduce___doc = 
+        "helper for pickle";
+
+    public final static String int___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String int___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String int___rfloordiv___doc = 
+        "x.__rfloordiv__(y) <==> y//x";
+
+    public final static String int___rlshift___doc = 
+        "x.__rlshift__(y) <==> y<<x";
+
+    public final static String int___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String int___rmul___doc = 
+        "x.__rmul__(y) <==> y*x";
+
+    public final static String int___ror___doc = 
+        "x.__ror__(y) <==> y|x";
+
+    public final static String int___rpow___doc = 
+        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
+
+    public final static String int___rrshift___doc = 
+        "x.__rrshift__(y) <==> y>>x";
+
+    public final static String int___rshift___doc = 
+        "x.__rshift__(y) <==> x>>y";
+
+    public final static String int___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String int___rtruediv___doc = 
+        "x.__rtruediv__(y) <==> y/x";
+
+    public final static String int___rxor___doc = 
+        "x.__rxor__(y) <==> y^x";
+
+    public final static String int___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String int___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String int___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String int___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String int___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String int___truediv___doc = 
+        "x.__truediv__(y) <==> x/y";
+
+    public final static String int___trunc___doc = 
+        "Truncating an Integral returns itself.";
+
+    public final static String int___xor___doc = 
+        "x.__xor__(y) <==> x^y";
+
+    public final static String int_bit_length_doc = 
+        "int.bit_length() -> int\n" + 
+        "\n" + 
+        "Number of bits necessary to represent self in binary.\n" + 
+        ">>> bin(37)\n" + 
+        "'0b100101'\n" + 
+        ">>> (37).bit_length()\n" + 
+        "6";
+
+    public final static String int_conjugate_doc = 
+        "Returns self, the complex conjugate of any int.";
+
+    public final static String int_denominator_doc = 
+        "the denominator of a rational number in lowest terms";
+
+    public final static String int_imag_doc = 
+        "the imaginary part of a complex number";
+
+    public final static String int_numerator_doc = 
+        "the numerator of a rational number in lowest terms";
+
+    public final static String int_real_doc = 
+        "the real part of a complex number";
+
+    // Docs for <type 'xrange'>
+    public final static String xrange___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String xrange___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String xrange_doc = 
+        "xrange([start,] stop[, step]) -> xrange object\n" + 
+        "\n" + 
+        "Like range(), but instead of returning a list, returns an object that\n" + 
+        "generates the numbers in the range on demand.  For looping, this is \n" + 
+        "slightly faster than range() and more memory efficient.";
+
+    public final static String xrange___format___doc = 
+        "default object formatter";
+
+    public final static String xrange___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String xrange___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String xrange___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String xrange___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String xrange___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String xrange___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String xrange___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String xrange___reduce___doc = 
+        "";
+
+    public final static String xrange___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String xrange___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String xrange___reversed___doc = 
+        "Returns a reverse iterator.";
+
+    public final static String xrange___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String xrange___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String xrange___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String xrange___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    // Docs for <type 'file'>
+    public final static String file___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String file___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String file_doc = 
+        "file(name[, mode[, buffering]]) -> file object\n" + 
+        "\n" + 
+        "Open a file.  The mode can be 'r', 'w' or 'a' for reading (default),\n" + 
+        "writing or appending.  The file will be created if it doesn't exist\n" + 
+        "when opened for writing or appending; it will be truncated when\n" + 
+        "opened for writing.  Add a 'b' to the mode for binary files.\n" + 
+        "Add a '+' to the mode to allow simultaneous reading and writing.\n" + 
+        "If the buffering argument is given, 0 means unbuffered, 1 means line\n" + 
+        "buffered, and larger numbers specify the buffer size.  The preferred way\n" + 
+        "to open a file is with the builtin open() function.\n" + 
+        "Add a 'U' to mode to open the file for input with universal newline\n" + 
+        "support.  Any line ending in the input file will be seen as a '\\n'\n" + 
+        "in Python.  Also, a file so opened gains the attribute 'newlines';\n" + 
+        "the value for this attribute is one of None (no newline read yet),\n" + 
+        "'\\r', '\\n', '\\r\\n' or a tuple containing all the newline types seen.\n" + 
+        "\n" + 
+        "'U' cannot be combined with 'w' or '+' mode.\n" + 
+        "";
+
+    public final static String file___enter___doc = 
+        "__enter__() -> self.";
+
+    public final static String file___exit___doc = 
+        "__exit__(*excinfo) -> None.  Closes the file.";
+
+    public final static String file___format___doc = 
+        "default object formatter";
+
+    public final static String file___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String file___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String file___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String file___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String file___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String file___reduce___doc = 
+        "helper for pickle";
+
+    public final static String file___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String file___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String file___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String file___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String file___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String file___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String file_close_doc = 
+        "close() -> None or (perhaps) an integer.  Close the file.\n" + 
+        "\n" + 
+        "Sets data attribute .closed to True.  A closed file cannot be used for\n" + 
+        "further I/O operations.  close() may be called more than once without\n" + 
+        "error.  Some kinds of file objects (for example, opened by popen())\n" + 
+        "may return an exit status upon closing.";
+
+    public final static String file_closed_doc = 
+        "True if the file is closed";
+
+    public final static String file_encoding_doc = 
+        "file encoding";
+
+    public final static String file_errors_doc = 
+        "Unicode error handler";
+
+    public final static String file_fileno_doc = 
+        "fileno() -> integer \"file descriptor\".\n" + 
+        "\n" + 
+        "This is needed for lower-level file interfaces, such os.read().";
+
+    public final static String file_flush_doc = 
+        "flush() -> None.  Flush the internal I/O buffer.";
+
+    public final static String file_isatty_doc = 
+        "isatty() -> true or false.  True if the file is connected to a tty device.";
+
+    public final static String file_mode_doc = 
+        "file mode ('r', 'U', 'w', 'a', possibly with 'b' or '+' added)";
+
+    public final static String file_name_doc = 
+        "file name";
+
+    public final static String file_newlines_doc = 
+        "end-of-line convention used in this file";
+
+    public final static String file_next_doc = 
+        "x.next() -> the next value, or raise StopIteration";
+
+    public final static String file_read_doc = 
+        "read([size]) -> read at most size bytes, returned as a string.\n" + 
+        "\n" + 
+        "If the size argument is negative or omitted, read until EOF is reached.\n" + 
+        "Notice that when in non-blocking mode, less data than what was requested\n" + 
+        "may be returned, even if no size parameter was given.";
+
+    public final static String file_readinto_doc = 
+        "readinto() -> Undocumented.  Don't use this; it may go away.";
+
+    public final static String file_readline_doc = 
+        "readline([size]) -> next line from the file, as a string.\n" + 
+        "\n" + 
+        "Retain newline.  A non-negative size argument limits the maximum\n" + 
+        "number of bytes to return (an incomplete line may be returned then).\n" + 
+        "Return an empty string at EOF.";
+
+    public final static String file_readlines_doc = 
+        "readlines([size]) -> list of strings, each a line from the file.\n" + 
+        "\n" + 
+        "Call readline() repeatedly and return a list of the lines so read.\n" + 
+        "The optional size argument, if given, is an approximate bound on the\n" + 
+        "total number of bytes in the lines returned.";
+
+    public final static String file_seek_doc = 
+        "seek(offset[, whence]) -> None.  Move to new file position.\n" + 
+        "\n" + 
+        "Argument offset is a byte count.  Optional argument whence defaults to\n" + 
+        "0 (offset from start of file, offset should be >= 0); other values are 1\n" + 
+        "(move relative to current position, positive or negative), and 2 (move\n" + 
+        "relative to end of file, usually negative, although many platforms allow\n" + 
+        "seeking beyond the end of a file).  If the file is opened in text mode,\n" + 
+        "only offsets returned by tell() are legal.  Use of other offsets causes\n" + 
+        "undefined behavior.\n" + 
+        "Note that not all file objects are seekable.";
+
+    public final static String file_softspace_doc = 
+        "flag indicating that a space needs to be printed; used by print";
+
+    public final static String file_tell_doc = 
+        "tell() -> current file position, an integer (may be a long integer).";
+
+    public final static String file_truncate_doc = 
+        "truncate([size]) -> None.  Truncate the file to at most size bytes.\n" + 
+        "\n" + 
+        "Size defaults to the current file position, as returned by tell().";
+
+    public final static String file_write_doc = 
+        "write(str) -> None.  Write string str to file.\n" + 
+        "\n" + 
+        "Note that due to buffering, flush() or close() may be needed before\n" + 
+        "the file on disk reflects the data written.";
+
+    public final static String file_writelines_doc = 
+        "writelines(sequence_of_strings) -> None.  Write the strings to the file.\n" + 
+        "\n" + 
+        "Note that newlines are not added.  The sequence can be any iterable object\n" + 
+        "producing strings. This is equivalent to calling write() for each string.";
+
+    public final static String file_xreadlines_doc = 
+        "xreadlines() -> returns self.\n" + 
+        "\n" + 
+        "For backward compatibility. File objects now include the performance\n" + 
+        "optimizations previously implemented in the xreadlines module.";
+
+    // Docs for <type 'complex'>
+    public final static String complex___abs___doc = 
+        "x.__abs__() <==> abs(x)";
+
+    public final static String complex___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String complex___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String complex___coerce___doc = 
+        "x.__coerce__(y) <==> coerce(x, y)";
+
+    public final static String complex___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String complex___div___doc = 
+        "x.__div__(y) <==> x/y";
+
+    public final static String complex___divmod___doc = 
+        "x.__divmod__(y) <==> divmod(x, y)";
+
+    public final static String complex_doc = 
+        "complex(real[, imag]) -> complex number\n" + 
+        "\n" + 
+        "Create a complex number from a real part and an optional imaginary part.\n" + 
+        "This is equivalent to (real + imag*1j) where imag defaults to 0.";
+
+    public final static String complex___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String complex___float___doc = 
+        "x.__float__() <==> float(x)";
+
+    public final static String complex___floordiv___doc = 
+        "x.__floordiv__(y) <==> x//y";
+
+    public final static String complex___format___doc = 
+        "complex.__format__() -> str\n" + 
+        "\n" + 
+        "Converts to a string according to format_spec.";
+
+    public final static String complex___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String complex___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String complex___getnewargs___doc = 
+        "";
+
+    public final static String complex___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String complex___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String complex___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String complex___int___doc = 
+        "x.__int__() <==> int(x)";
+
+    public final static String complex___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String complex___long___doc = 
+        "x.__long__() <==> long(x)";
+
+    public final static String complex___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String complex___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String complex___mul___doc = 
+        "x.__mul__(y) <==> x*y";
+
+    public final static String complex___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String complex___neg___doc = 
+        "x.__neg__() <==> -x";
+
+    public final static String complex___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String complex___nonzero___doc = 
+        "x.__nonzero__() <==> x != 0";
+
+    public final static String complex___pos___doc = 
+        "x.__pos__() <==> +x";
+
+    public final static String complex___pow___doc = 
+        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
+
+    public final static String complex___radd___doc = 
+        "x.__radd__(y) <==> y+x";
+
+    public final static String complex___rdiv___doc = 
+        "x.__rdiv__(y) <==> y/x";
+
+    public final static String complex___rdivmod___doc = 
+        "x.__rdivmod__(y) <==> divmod(y, x)";
+
+    public final static String complex___reduce___doc = 
+        "helper for pickle";
+
+    public final static String complex___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String complex___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String complex___rfloordiv___doc = 
+        "x.__rfloordiv__(y) <==> y//x";
+
+    public final static String complex___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String complex___rmul___doc = 
+        "x.__rmul__(y) <==> y*x";
+
+    public final static String complex___rpow___doc = 
+        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
+
+    public final static String complex___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String complex___rtruediv___doc = 
+        "x.__rtruediv__(y) <==> y/x";
+
+    public final static String complex___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String complex___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String complex___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String complex___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String complex___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String complex___truediv___doc = 
+        "x.__truediv__(y) <==> x/y";
+
+    public final static String complex_conjugate_doc = 
+        "complex.conjugate() -> complex\n" + 
+        "\n" + 
+        "Returns the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.";
+
+    public final static String complex_imag_doc = 
+        "the imaginary part of a complex number";
+
+    public final static String complex_real_doc = 
+        "the real part of a complex number";
+
+    // Docs for <type 'bool'>
+    public final static String bool___abs___doc = 
+        "x.__abs__() <==> abs(x)";
+
+    public final static String bool___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String bool___and___doc = 
+        "x.__and__(y) <==> x&y";
+
+    public final static String bool___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String bool___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String bool___coerce___doc = 
+        "x.__coerce__(y) <==> coerce(x, y)";
+
+    public final static String bool___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String bool___div___doc = 
+        "x.__div__(y) <==> x/y";
+
+    public final static String bool___divmod___doc = 
+        "x.__divmod__(y) <==> divmod(x, y)";
+
+    public final static String bool_doc = 
+        "bool(x) -> bool\n" + 
+        "\n" + 
+        "Returns True when the argument x is true, False otherwise.\n" + 
+        "The builtins True and False are the only two instances of the class bool.\n" + 
+        "The class bool is a subclass of the class int, and cannot be subclassed.";
+
+    public final static String bool___float___doc = 
+        "x.__float__() <==> float(x)";
+
+    public final static String bool___floordiv___doc = 
+        "x.__floordiv__(y) <==> x//y";
+
+    public final static String bool___format___doc = 
+        "";
+
+    public final static String bool___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String bool___getnewargs___doc = 
+        "";
+
+    public final static String bool___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String bool___hex___doc = 
+        "x.__hex__() <==> hex(x)";
+
+    public final static String bool___index___doc = 
+        "x[y:z] <==> x[y.__index__():z.__index__()]";
+
+    public final static String bool___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String bool___int___doc = 
+        "x.__int__() <==> int(x)";
+
+    public final static String bool___invert___doc = 
+        "x.__invert__() <==> ~x";
+
+    public final static String bool___long___doc = 
+        "x.__long__() <==> long(x)";
+
+    public final static String bool___lshift___doc = 
+        "x.__lshift__(y) <==> x<<y";
+
+    public final static String bool___mod___doc = 
+        "x.__mod__(y) <==> x%y";
+
+    public final static String bool___mul___doc = 
+        "x.__mul__(y) <==> x*y";
+
+    public final static String bool___neg___doc = 
+        "x.__neg__() <==> -x";
+
+    public final static String bool___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String bool___nonzero___doc = 
+        "x.__nonzero__() <==> x != 0";
+
+    public final static String bool___oct___doc = 
+        "x.__oct__() <==> oct(x)";
+
+    public final static String bool___or___doc = 
+        "x.__or__(y) <==> x|y";
+
+    public final static String bool___pos___doc = 
+        "x.__pos__() <==> +x";
+
+    public final static String bool___pow___doc = 
+        "x.__pow__(y[, z]) <==> pow(x, y[, z])";
+
+    public final static String bool___radd___doc = 
+        "x.__radd__(y) <==> y+x";
+
+    public final static String bool___rand___doc = 
+        "x.__rand__(y) <==> y&x";
+
+    public final static String bool___rdiv___doc = 
+        "x.__rdiv__(y) <==> y/x";
+
+    public final static String bool___rdivmod___doc = 
+        "x.__rdivmod__(y) <==> divmod(y, x)";
+
+    public final static String bool___reduce___doc = 
+        "helper for pickle";
+
+    public final static String bool___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String bool___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String bool___rfloordiv___doc = 
+        "x.__rfloordiv__(y) <==> y//x";
+
+    public final static String bool___rlshift___doc = 
+        "x.__rlshift__(y) <==> y<<x";
+
+    public final static String bool___rmod___doc = 
+        "x.__rmod__(y) <==> y%x";
+
+    public final static String bool___rmul___doc = 
+        "x.__rmul__(y) <==> y*x";
+
+    public final static String bool___ror___doc = 
+        "x.__ror__(y) <==> y|x";
+
+    public final static String bool___rpow___doc = 
+        "y.__rpow__(x[, z]) <==> pow(x, y[, z])";
+
+    public final static String bool___rrshift___doc = 
+        "x.__rrshift__(y) <==> y>>x";
+
+    public final static String bool___rshift___doc = 
+        "x.__rshift__(y) <==> x>>y";
+
+    public final static String bool___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String bool___rtruediv___doc = 
+        "x.__rtruediv__(y) <==> y/x";
+
+    public final static String bool___rxor___doc = 
+        "x.__rxor__(y) <==> y^x";
+
+    public final static String bool___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String bool___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String bool___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String bool___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String bool___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String bool___truediv___doc = 
+        "x.__truediv__(y) <==> x/y";
+
+    public final static String bool___trunc___doc = 
+        "Truncating an Integral returns itself.";
+
+    public final static String bool___xor___doc = 
+        "x.__xor__(y) <==> x^y";
+
+    public final static String bool_bit_length_doc = 
+        "int.bit_length() -> int\n" + 
+        "\n" + 
+        "Number of bits necessary to represent self in binary.\n" + 
+        ">>> bin(37)\n" + 
+        "'0b100101'\n" + 
+        ">>> (37).bit_length()\n" + 
+        "6";
+
+    public final static String bool_conjugate_doc = 
+        "Returns self, the complex conjugate of any int.";
+
+    public final static String bool_denominator_doc = 
+        "the denominator of a rational number in lowest terms";
+
+    public final static String bool_imag_doc = 
+        "the imaginary part of a complex number";
+
+    public final static String bool_numerator_doc = 
+        "the numerator of a rational number in lowest terms";
+
+    public final static String bool_real_doc = 
+        "the real part of a complex number";
+
+    // Docs for <type 'classmethod'>
+    public final static String classmethod___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String classmethod___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String classmethod_doc = 
+        "classmethod(function) -> method\n" + 
+        "\n" + 
+        "Convert a function to be a class method.\n" + 
+        "\n" + 
+        "A class method receives the class as implicit first argument,\n" + 
+        "just like an instance method receives the instance.\n" + 
+        "To declare a class method, use this idiom:\n" + 
+        "\n" + 
+        "  class C:\n" + 
+        "      def f(cls, arg1, arg2, ...): ...\n" + 
+        "      f = classmethod(f)\n" + 
+        "\n" + 
+        "It can be called either on the class (e.g. C.f()) or on an instance\n" + 
+        "(e.g. C().f()).  The instance is ignored except for its class.\n" + 
+        "If a class method is called for a derived class, the derived class\n" + 
+        "object is passed as the implied first argument.\n" + 
+        "\n" + 
+        "Class methods are different than C++ or Java static methods.\n" + 
+        "If you want those, see the staticmethod builtin.";
+
+    public final static String classmethod___format___doc = 
+        "default object formatter";
+
+    public final static String classmethod___func___doc = 
+        "";
+
+    public final static String classmethod___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String classmethod___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String classmethod___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String classmethod___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String classmethod___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String classmethod___reduce___doc = 
+        "helper for pickle";
+
+    public final static String classmethod___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String classmethod___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String classmethod___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String classmethod___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String classmethod___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String classmethod___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    // Docs for <type 'set'>
+    public final static String set___and___doc = 
+        "x.__and__(y) <==> x&y";
+
+    public final static String set___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String set___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String set___contains___doc = 
+        "x.__contains__(y) <==> y in x.";
+
+    public final static String set___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String set_doc = 
+        "set() -> new empty set object\n" + 
+        "set(iterable) -> new set object\n" + 
+        "\n" + 
+        "Build an unordered collection of unique elements.";
+
+    public final static String set___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String set___format___doc = 
+        "default object formatter";
+
+    public final static String set___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String set___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String set___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String set___hash___doc = 
+        "";
+
+    public final static String set___iand___doc = 
+        "x.__iand__(y) <==> x&y";
+
+    public final static String set___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String set___ior___doc = 
+        "x.__ior__(y) <==> x|y";
+
+    public final static String set___isub___doc = 
+        "x.__isub__(y) <==> x-y";
+
+    public final static String set___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String set___ixor___doc = 
+        "x.__ixor__(y) <==> x^y";
+
+    public final static String set___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String set___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String set___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String set___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String set___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String set___or___doc = 
+        "x.__or__(y) <==> x|y";
+
+    public final static String set___rand___doc = 
+        "x.__rand__(y) <==> y&x";
+
+    public final static String set___reduce___doc = 
+        "Return state information for pickling.";
+
+    public final static String set___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String set___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String set___ror___doc = 
+        "x.__ror__(y) <==> y|x";
+
+    public final static String set___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String set___rxor___doc = 
+        "x.__rxor__(y) <==> y^x";
+
+    public final static String set___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String set___sizeof___doc = 
+        "S.__sizeof__() -> size of S in memory, in bytes";
+
+    public final static String set___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String set___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String set___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String set___xor___doc = 
+        "x.__xor__(y) <==> x^y";
+
+    public final static String set_add_doc = 
+        "Add an element to a set.\n" + 
+        "\n" + 
+        "This has no effect if the element is already present.";
+
+    public final static String set_clear_doc = 
+        "Remove all elements from this set.";
+
+    public final static String set_copy_doc = 
+        "Return a shallow copy of a set.";
+
+    public final static String set_difference_doc = 
+        "Return the difference of two or more sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in this set but not the others.)";
+
+    public final static String set_difference_update_doc = 
+        "Remove all elements of another set from this set.";
+
+    public final static String set_discard_doc = 
+        "Remove an element from a set if it is a member.\n" + 
+        "\n" + 
+        "If the element is not a member, do nothing.";
+
+    public final static String set_intersection_doc = 
+        "Return the intersection of two or more sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. elements that are common to all of the sets.)";
+
+    public final static String set_intersection_update_doc = 
+        "Update a set with the intersection of itself and another.";
+
+    public final static String set_isdisjoint_doc = 
+        "Return True if two sets have a null intersection.";
+
+    public final static String set_issubset_doc = 
+        "Report whether another set contains this set.";
+
+    public final static String set_issuperset_doc = 
+        "Report whether this set contains another set.";
+
+    public final static String set_pop_doc = 
+        "Remove and return an arbitrary set element.\n" + 
+        "Raises KeyError if the set is empty.";
+
+    public final static String set_remove_doc = 
+        "Remove an element from a set; it must be a member.\n" + 
+        "\n" + 
+        "If the element is not a member, raise a KeyError.";
+
+    public final static String set_symmetric_difference_doc = 
+        "Return the symmetric difference of two sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in exactly one of the sets.)";
+
+    public final static String set_symmetric_difference_update_doc = 
+        "Update a set with the symmetric difference of itself and another.";
+
+    public final static String set_union_doc = 
+        "Return the union of sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in either set.)";
+
+    public final static String set_update_doc = 
+        "Update a set with the union of itself and others.";
+
+    // Docs for <type 'frozenset'>
+    public final static String frozenset___and___doc = 
+        "x.__and__(y) <==> x&y";
+
+    public final static String frozenset___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String frozenset___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String frozenset___contains___doc = 
+        "x.__contains__(y) <==> y in x.";
+
+    public final static String frozenset___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String frozenset_doc = 
+        "frozenset() -> empty frozenset object\n" + 
+        "frozenset(iterable) -> frozenset object\n" + 
+        "\n" + 
+        "Build an immutable unordered collection of unique elements.";
+
+    public final static String frozenset___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String frozenset___format___doc = 
+        "default object formatter";
+
+    public final static String frozenset___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String frozenset___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String frozenset___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String frozenset___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String frozenset___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String frozenset___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String frozenset___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String frozenset___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String frozenset___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String frozenset___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String frozenset___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String frozenset___or___doc = 
+        "x.__or__(y) <==> x|y";
+
+    public final static String frozenset___rand___doc = 
+        "x.__rand__(y) <==> y&x";
+
+    public final static String frozenset___reduce___doc = 
+        "Return state information for pickling.";
+
+    public final static String frozenset___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String frozenset___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String frozenset___ror___doc = 
+        "x.__ror__(y) <==> y|x";
+
+    public final static String frozenset___rsub___doc = 
+        "x.__rsub__(y) <==> y-x";
+
+    public final static String frozenset___rxor___doc = 
+        "x.__rxor__(y) <==> y^x";
+
+    public final static String frozenset___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String frozenset___sizeof___doc = 
+        "S.__sizeof__() -> size of S in memory, in bytes";
+
+    public final static String frozenset___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String frozenset___sub___doc = 
+        "x.__sub__(y) <==> x-y";
+
+    public final static String frozenset___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String frozenset___xor___doc = 
+        "x.__xor__(y) <==> x^y";
+
+    public final static String frozenset_copy_doc = 
+        "Return a shallow copy of a set.";
+
+    public final static String frozenset_difference_doc = 
+        "Return the difference of two or more sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in this set but not the others.)";
+
+    public final static String frozenset_intersection_doc = 
+        "Return the intersection of two or more sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. elements that are common to all of the sets.)";
+
+    public final static String frozenset_isdisjoint_doc = 
+        "Return True if two sets have a null intersection.";
+
+    public final static String frozenset_issubset_doc = 
+        "Report whether another set contains this set.";
+
+    public final static String frozenset_issuperset_doc = 
+        "Report whether this set contains another set.";
+
+    public final static String frozenset_symmetric_difference_doc = 
+        "Return the symmetric difference of two sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in exactly one of the sets.)";
+
+    public final static String frozenset_union_doc = 
+        "Return the union of sets as a new set.\n" + 
+        "\n" + 
+        "(i.e. all elements that are in either set.)";
+
+    // Docs for <type 'exceptions.BaseException'>
+    public final static String BaseException___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String BaseException___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String BaseException___dict___doc = 
+        "";
+
+    public final static String BaseException_doc = 
+        "Common base class for all exceptions";
+
+    public final static String BaseException___format___doc = 
+        "default object formatter";
+
+    public final static String BaseException___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String BaseException___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String BaseException___getslice___doc = 
+        "x.__getslice__(i, j) <==> x[i:j]\n" + 
+        "           \n" + 
+        "           Use of negative indices is not supported.";
+
+    public final static String BaseException___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String BaseException___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String BaseException___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String BaseException___reduce___doc = 
+        "";
+
+    public final static String BaseException___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String BaseException___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String BaseException___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String BaseException___setstate___doc = 
+        "";
+
+    public final static String BaseException___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String BaseException___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String BaseException___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String BaseException___unicode___doc = 
+        "";
+
+    public final static String BaseException_args_doc = 
+        "";
+
+    public final static String BaseException_message_doc = 
+        "";
+
+    // Docs for <type 'bytearray'>
+    public final static String bytearray___add___doc = 
+        "x.__add__(y) <==> x+y";
+
+    public final static String bytearray___alloc___doc = 
+        "B.__alloc__() -> int\n" + 
+        "\n" + 
+        "Returns the number of bytes actually allocated.";
+
+    public final static String bytearray___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String bytearray___contains___doc = 
+        "x.__contains__(y) <==> y in x";
+
+    public final static String bytearray___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String bytearray___delitem___doc = 
+        "x.__delitem__(y) <==> del x[y]";
+
+    public final static String bytearray_doc = 
+        "bytearray(iterable_of_ints) -> bytearray.\n" + 
+        "bytearray(string, encoding[, errors]) -> bytearray.\n" + 
+        "bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray.\n" + 
+        "bytearray(memory_view) -> bytearray.\n" + 
+        "\n" + 
+        "Construct an mutable bytearray object from:\n" + 
+        "  - an iterable yielding integers in range(256)\n" + 
+        "  - a text string encoded using the specified encoding\n" + 
+        "  - a bytes or a bytearray object\n" + 
+        "  - any object implementing the buffer API.\n" + 
+        "\n" + 
+        "bytearray(int) -> bytearray.\n" + 
+        "\n" + 
+        "Construct a zero-initialized bytearray of the given length.";
+
+    public final static String bytearray___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String bytearray___format___doc = 
+        "default object formatter";
+
+    public final static String bytearray___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String bytearray___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String bytearray___getitem___doc = 
+        "x.__getitem__(y) <==> x[y]";
+
+    public final static String bytearray___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String bytearray___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String bytearray___iadd___doc = 
+        "x.__iadd__(y) <==> x+=y";
+
+    public final static String bytearray___imul___doc = 
+        "x.__imul__(y) <==> x*=y";
+
+    public final static String bytearray___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String bytearray___iter___doc = 
+        "x.__iter__() <==> iter(x)";
+
+    public final static String bytearray___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String bytearray___len___doc = 
+        "x.__len__() <==> len(x)";
+
+    public final static String bytearray___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String bytearray___mul___doc = 
+        "x.__mul__(n) <==> x*n";
+
+    public final static String bytearray___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String bytearray___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String bytearray___reduce___doc = 
+        "Return state information for pickling.";
+
+    public final static String bytearray___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String bytearray___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String bytearray___rmul___doc = 
+        "x.__rmul__(n) <==> n*x";
+
+    public final static String bytearray___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String bytearray___setitem___doc = 
+        "x.__setitem__(i, y) <==> x[i]=y";
+
+    public final static String bytearray___sizeof___doc = 
+        "B.__sizeof__() -> int\n" + 
+        " \n" + 
+        "Returns the size of B in memory, in bytes";
+
+    public final static String bytearray___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String bytearray___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String bytearray_append_doc = 
+        "B.append(int) -> None\n" + 
+        "\n" + 
+        "Append a single item to the end of B.";
+
+    public final static String bytearray_capitalize_doc = 
+        "B.capitalize() -> copy of B\n" + 
+        "\n" + 
+        "Return a copy of B with only its first character capitalized (ASCII)\n" + 
+        "and the rest lower-cased.";
+
+    public final static String bytearray_center_doc = 
+        "B.center(width[, fillchar]) -> copy of B\n" + 
+        "\n" + 
+        "Return B centered in a string of length width.  Padding is\n" + 
+        "done using the specified fill character (default is a space).";
+
+    public final static String bytearray_count_doc = 
+        "B.count(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the number of non-overlapping occurrences of subsection sub in\n" + 
+        "bytes B[start:end].  Optional arguments start and end are interpreted\n" + 
+        "as in slice notation.";
+
+    public final static String bytearray_decode_doc = 
+        "B.decode([encoding[, errors]]) -> unicode object.\n" + 
+        "\n" + 
+        "Decodes B using the codec registered for encoding. encoding defaults\n" + 
+        "to the default encoding. errors may be given to set a different error\n" + 
+        "handling scheme.  Default is 'strict' meaning that encoding errors raise\n" + 
+        "a UnicodeDecodeError.  Other possible values are 'ignore' and 'replace'\n" + 
+        "as well as any other name registered with codecs.register_error that is\n" + 
+        "able to handle UnicodeDecodeErrors.";
+
+    public final static String bytearray_endswith_doc = 
+        "B.endswith(suffix [,start [,end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if B ends with the specified suffix, False otherwise.\n" + 
+        "With optional start, test B beginning at that position.\n" + 
+        "With optional end, stop comparing B at that position.\n" + 
+        "suffix can also be a tuple of strings to try.";
+
+    public final static String bytearray_expandtabs_doc = 
+        "B.expandtabs([tabsize]) -> copy of B\n" + 
+        "\n" + 
+        "Return a copy of B where all tab characters are expanded using spaces.\n" + 
+        "If tabsize is not given, a tab size of 8 characters is assumed.";
+
+    public final static String bytearray_extend_doc = 
+        "B.extend(iterable int) -> None\n" + 
+        "\n" + 
+        "Append all the elements from the iterator or sequence to the\n" + 
+        "end of B.";
+
+    public final static String bytearray_find_doc = 
+        "B.find(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the lowest index in B where subsection sub is found,\n" + 
+        "such that sub is contained within s[start,end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String bytearray_fromhex_doc = 
+        "bytearray.fromhex(string) -> bytearray\n" + 
+        "\n" + 
+        "Create a bytearray object from a string of hexadecimal numbers.\n" + 
+        "Spaces between two numbers are accepted.\n" + 
+        "Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef').";
+
+    public final static String bytearray_index_doc = 
+        "B.index(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like B.find() but raise ValueError when the subsection is not found.";
+
+    public final static String bytearray_insert_doc = 
+        "B.insert(index, int) -> None\n" + 
+        "\n" + 
+        "Insert a single item into the bytearray before the given index.";
+
+    public final static String bytearray_isalnum_doc = 
+        "B.isalnum() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in B are alphanumeric\n" + 
+        "and there is at least one character in B, False otherwise.";
+
+    public final static String bytearray_isalpha_doc = 
+        "B.isalpha() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in B are alphabetic\n" + 
+        "and there is at least one character in B, False otherwise.";
+
+    public final static String bytearray_isdigit_doc = 
+        "B.isdigit() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in B are digits\n" + 
+        "and there is at least one character in B, False otherwise.";
+
+    public final static String bytearray_islower_doc = 
+        "B.islower() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in B are lowercase and there is\n" + 
+        "at least one cased character in B, False otherwise.";
+
+    public final static String bytearray_isspace_doc = 
+        "B.isspace() -> bool\n" + 
+        "\n" + 
+        "Return True if all characters in B are whitespace\n" + 
+        "and there is at least one character in B, False otherwise.";
+
+    public final static String bytearray_istitle_doc = 
+        "B.istitle() -> bool\n" + 
+        "\n" + 
+        "Return True if B is a titlecased string and there is at least one\n" + 
+        "character in B, i.e. uppercase characters may only follow uncased\n" + 
+        "characters and lowercase characters only cased ones. Return False\n" + 
+        "otherwise.";
+
+    public final static String bytearray_isupper_doc = 
+        "B.isupper() -> bool\n" + 
+        "\n" + 
+        "Return True if all cased characters in B are uppercase and there is\n" + 
+        "at least one cased character in B, False otherwise.";
+
+    public final static String bytearray_join_doc = 
+        "B.join(iterable_of_bytes) -> bytes\n" + 
+        "\n" + 
+        "Concatenates any number of bytearray objects, with B in between each pair.";
+
+    public final static String bytearray_ljust_doc = 
+        "B.ljust(width[, fillchar]) -> copy of B\n" + 
+        "\n" + 
+        "Return B left justified in a string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space).";
+
+    public final static String bytearray_lower_doc = 
+        "B.lower() -> copy of B\n" + 
+        "\n" + 
+        "Return a copy of B with all ASCII characters converted to lowercase.";
+
+    public final static String bytearray_lstrip_doc = 
+        "B.lstrip([bytes]) -> bytearray\n" + 
+        "\n" + 
+        "Strip leading bytes contained in the argument.\n" + 
+        "If the argument is omitted, strip leading ASCII whitespace.";
+
+    public final static String bytearray_partition_doc = 
+        "B.partition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Searches for the separator sep in B, and returns the part before it,\n" + 
+        "the separator itself, and the part after it.  If the separator is not\n" + 
+        "found, returns B and two empty bytearray objects.";
+
+    public final static String bytearray_pop_doc = 
+        "B.pop([index]) -> int\n" + 
+        "\n" + 
+        "Remove and return a single item from B. If no index\n" + 
+        "argument is given, will pop the last value.";
+
+    public final static String bytearray_remove_doc = 
+        "B.remove(int) -> None\n" + 
+        "\n" + 
+        "Remove the first occurance of a value in B.";
+
+    public final static String bytearray_replace_doc = 
+        "B.replace(old, new[, count]) -> bytes\n" + 
+        "\n" + 
+        "Return a copy of B with all occurrences of subsection\n" + 
+        "old replaced by new.  If the optional argument count is\n" + 
+        "given, only the first count occurrences are replaced.";
+
+    public final static String bytearray_reverse_doc = 
+        "B.reverse() -> None\n" + 
+        "\n" + 
+        "Reverse the order of the values in B in place.";
+
+    public final static String bytearray_rfind_doc = 
+        "B.rfind(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Return the highest index in B where subsection sub is found,\n" + 
+        "such that sub is contained within s[start,end].  Optional\n" + 
+        "arguments start and end are interpreted as in slice notation.\n" + 
+        "\n" + 
+        "Return -1 on failure.";
+
+    public final static String bytearray_rindex_doc = 
+        "B.rindex(sub [,start [,end]]) -> int\n" + 
+        "\n" + 
+        "Like B.rfind() but raise ValueError when the subsection is not found.";
+
+    public final static String bytearray_rjust_doc = 
+        "B.rjust(width[, fillchar]) -> copy of B\n" + 
+        "\n" + 
+        "Return B right justified in a string of length width. Padding is\n" + 
+        "done using the specified fill character (default is a space)";
+
+    public final static String bytearray_rpartition_doc = 
+        "B.rpartition(sep) -> (head, sep, tail)\n" + 
+        "\n" + 
+        "Searches for the separator sep in B, starting at the end of B,\n" + 
+        "and returns the part before it, the separator itself, and the\n" + 
+        "part after it.  If the separator is not found, returns two empty\n" + 
+        "bytearray objects and B.";
+
+    public final static String bytearray_rsplit_doc = 
+        "B.rsplit(sep[, maxsplit]) -> list of bytearray\n" + 
+        "\n" + 
+        "Return a list of the sections in B, using sep as the delimiter,\n" + 
+        "starting at the end of B and working to the front.\n" + 
+        "If sep is not given, B is split on ASCII whitespace characters\n" + 
+        "(space, tab, return, newline, formfeed, vertical tab).\n" + 
+        "If maxsplit is given, at most maxsplit splits are done.";
+
+    public final static String bytearray_rstrip_doc = 
+        "B.rstrip([bytes]) -> bytearray\n" + 
+        "\n" + 
+        "Strip trailing bytes contained in the argument.\n" + 
+        "If the argument is omitted, strip trailing ASCII whitespace.";
+
+    public final static String bytearray_split_doc = 
+        "B.split([sep[, maxsplit]]) -> list of bytearray\n" + 
+        "\n" + 
+        "Return a list of the sections in B, using sep as the delimiter.\n" + 
+        "If sep is not given, B is split on ASCII whitespace characters\n" + 
+        "(space, tab, return, newline, formfeed, vertical tab).\n" + 
+        "If maxsplit is given, at most maxsplit splits are done.";
+
+    public final static String bytearray_splitlines_doc = 
+        "B.splitlines([keepends]) -> list of lines\n" + 
+        "\n" + 
+        "Return a list of the lines in B, breaking at line boundaries.\n" + 
+        "Line breaks are not included in the resulting list unless keepends\n" + 
+        "is given and true.";
+
+    public final static String bytearray_startswith_doc = 
+        "B.startswith(prefix [,start [,end]]) -> bool\n" + 
+        "\n" + 
+        "Return True if B starts with the specified prefix, False otherwise.\n" + 
+        "With optional start, test B beginning at that position.\n" + 
+        "With optional end, stop comparing B at that position.\n" + 
+        "prefix can also be a tuple of strings to try.";
+
+    public final static String bytearray_strip_doc = 
+        "B.strip([bytes]) -> bytearray\n" + 
+        "\n" + 
+        "Strip leading and trailing bytes contained in the argument.\n" + 
+        "If the argument is omitted, strip ASCII whitespace.";
+
+    public final static String bytearray_swapcase_doc = 
+        "B.swapcase() -> copy of B\n" + 
+        "\n" + 
+        "Return a copy of B with uppercase ASCII characters converted\n" + 
+        "to lowercase ASCII and vice versa.";
+
+    public final static String bytearray_title_doc = 
+        "B.title() -> copy of B\n" + 
+        "\n" + 
+        "Return a titlecased version of B, i.e. ASCII words start with uppercase\n" + 
+        "characters, all remaining cased characters have lowercase.";
+
+    public final static String bytearray_translate_doc = 
+        "B.translate(table[, deletechars]) -> bytearray\n" + 
+        "\n" + 
+        "Return a copy of B, where all characters occurring in the\n" + 
+        "optional argument deletechars are removed, and the remaining\n" + 
+        "characters have been mapped through the given translation\n" + 
+        "table, which must be a bytes object of length 256.";
+
+    public final static String bytearray_upper_doc = 
+        "B.upper() -> copy of B\n" + 
+        "\n" + 
+        "Return a copy of B with all ASCII characters converted to uppercase.";
+
+    public final static String bytearray_zfill_doc = 
+        "B.zfill(width) -> copy of B\n" + 
+        "\n" + 
+        "Pad a numeric string B with zeros on the left, to fill a field\n" + 
+        "of the specified width.  B is never truncated.";
+
+    // Docs for <type 'function'>
+    public final static String function___call___doc = 
+        "x.__call__(...) <==> x(...)";
+
+    public final static String function___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String function___closure___doc = 
+        "";
+
+    public final static String function___code___doc = 
+        "";
+
+    public final static String function___defaults___doc = 
+        "";
+
+    public final static String function___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String function___dict___doc = 
+        "";
+
+    public final static String function_doc = 
+        "function(code, globals[, name[, argdefs[, closure]]])\n" + 
+        "\n" + 
+        "Create a function object from a code object and a dictionary.\n" + 
+        "The optional name string overrides the name from the code object.\n" + 
+        "The optional argdefs tuple specifies the default argument values.\n" + 
+        "The optional closure tuple supplies the bindings for free variables.";
+
+    public final static String function___format___doc = 
+        "default object formatter";
+
+    public final static String function___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String function___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String function___globals___doc = 
+        "";
+
+    public final static String function___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String function___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String function___module___doc = 
+        "str(object) -> string\n" + 
+        "\n" + 
+        "Return a nice string representation of the object.\n" + 
+        "If the argument is a string, the return value is the same object.";
+
+    public final static String function___name___doc = 
+        "str(object) -> string\n" + 
+        "\n" + 
+        "Return a nice string representation of the object.\n" + 
+        "If the argument is a string, the return value is the same object.";
+
+    public final static String function___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String function___reduce___doc = 
+        "helper for pickle";
+
+    public final static String function___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String function___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String function___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String function___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String function___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String function___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String function_func_closure_doc = 
+        "";
+
+    public final static String function_func_code_doc = 
+        "";
+
+    public final static String function_func_defaults_doc = 
+        "";
+
+    public final static String function_func_dict_doc = 
+        "";
+
+    public final static String function_func_doc_doc = 
+        "";
+
+    public final static String function_func_globals_doc = 
+        "";
+
+    public final static String function_func_name_doc = 
+        "";
+
+    // Docs for <type 'instancemethod'>
+    public final static String instancemethod___call___doc = 
+        "x.__call__(...) <==> x(...)";
+
+    public final static String instancemethod___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String instancemethod___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String instancemethod___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String instancemethod_doc = 
+        "instancemethod(function, instance, class)\n" + 
+        "\n" + 
+        "Create an instance method object.";
+
+    public final static String instancemethod___format___doc = 
+        "default object formatter";
+
+    public final static String instancemethod___func___doc = 
+        "the function (or other callable) implementing a method";
+
+    public final static String instancemethod___get___doc = 
+        "descr.__get__(obj[, type]) -> value";
+
+    public final static String instancemethod___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String instancemethod___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String instancemethod___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String instancemethod___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String instancemethod___reduce___doc = 
+        "helper for pickle";
+
+    public final static String instancemethod___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String instancemethod___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String instancemethod___self___doc = 
+        "the instance to which a method is bound; None for unbound methods";
+
+    public final static String instancemethod___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String instancemethod___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String instancemethod___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String instancemethod___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String instancemethod_im_class_doc = 
+        "the class associated with a method";
+
+    public final static String instancemethod_im_func_doc = 
+        "the function (or other callable) implementing a method";
+
+    public final static String instancemethod_im_self_doc = 
+        "the instance to which a method is bound; None for unbound methods";
+
+    // Docs for <type 'code'>
+    public final static String code___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String code___cmp___doc = 
+        "x.__cmp__(y) <==> cmp(x,y)";
+
+    public final static String code___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String code_doc = 
+        "code(argcount, nlocals, stacksize, flags, codestring, constants, names,\n" + 
+        "      varnames, filename, name, firstlineno, lnotab[, freevars[, cellvars]])\n" + 
+        "\n" + 
+        "Create a code object.  Not for the faint of heart.";
+
+    public final static String code___eq___doc = 
+        "x.__eq__(y) <==> x==y";
+
+    public final static String code___format___doc = 
+        "default object formatter";
+
+    public final static String code___ge___doc = 
+        "x.__ge__(y) <==> x>=y";
+
+    public final static String code___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String code___gt___doc = 
+        "x.__gt__(y) <==> x>y";
+
+    public final static String code___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String code___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String code___le___doc = 
+        "x.__le__(y) <==> x<=y";
+
+    public final static String code___lt___doc = 
+        "x.__lt__(y) <==> x<y";
+
+    public final static String code___ne___doc = 
+        "x.__ne__(y) <==> x!=y";
+
+    public final static String code___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String code___reduce___doc = 
+        "helper for pickle";
+
+    public final static String code___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String code___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String code___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String code___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String code___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String code___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String code_co_argcount_doc = 
+        "";
+
+    public final static String code_co_cellvars_doc = 
+        "";
+
+    public final static String code_co_code_doc = 
+        "";
+
+    public final static String code_co_consts_doc = 
+        "";
+
+    public final static String code_co_filename_doc = 
+        "";
+
+    public final static String code_co_firstlineno_doc = 
+        "";
+
+    public final static String code_co_flags_doc = 
+        "";
+
+    public final static String code_co_freevars_doc = 
+        "";
+
+    public final static String code_co_lnotab_doc = 
+        "";
+
+    public final static String code_co_name_doc = 
+        "";
+
+    public final static String code_co_names_doc = 
+        "";
+
+    public final static String code_co_nlocals_doc = 
+        "";
+
+    public final static String code_co_stacksize_doc = 
+        "";
+
+    public final static String code_co_varnames_doc = 
+        "";
+
+    // Docs for <type 'frame'>
+    public final static String frame___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String frame___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String frame_doc = 
+        "";
+
+    public final static String frame___format___doc = 
+        "default object formatter";
+
+    public final static String frame___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String frame___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String frame___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String frame___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String frame___reduce___doc = 
+        "helper for pickle";
+
+    public final static String frame___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String frame___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String frame___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String frame___sizeof___doc = 
+        "F.__sizeof__() -> size of F in memory, in bytes";
+
+    public final static String frame___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String frame___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String frame_f_back_doc = 
+        "";
+
+    public final static String frame_f_builtins_doc = 
+        "";
+
+    public final static String frame_f_code_doc = 
+        "";
+
+    public final static String frame_f_exc_traceback_doc = 
+        "";
+
+    public final static String frame_f_exc_type_doc = 
+        "";
+
+    public final static String frame_f_exc_value_doc = 
+        "";
+
+    public final static String frame_f_globals_doc = 
+        "";
+
+    public final static String frame_f_lasti_doc = 
+        "";
+
+    public final static String frame_f_lineno_doc = 
+        "";
+
+    public final static String frame_f_locals_doc = 
+        "";
+
+    public final static String frame_f_restricted_doc = 
+        "";
+
+    public final static String frame_f_trace_doc = 
+        "";
+
+    // Docs for <type 'traceback'>
+    public final static String traceback___class___doc = 
+        "type(object) -> the object's type\n" + 
+        "type(name, bases, dict) -> a new type";
+
+    public final static String traceback___delattr___doc = 
+        "x.__delattr__('name') <==> del x.name";
+
+    public final static String traceback_doc = 
+        "";
+
+    public final static String traceback___format___doc = 
+        "default object formatter";
+
+    public final static String traceback___getattribute___doc = 
+        "x.__getattribute__('name') <==> x.name";
+
+    public final static String traceback___hash___doc = 
+        "x.__hash__() <==> hash(x)";
+
+    public final static String traceback___init___doc = 
+        "x.__init__(...) initializes x; see help(type(x)) for signature";
+
+    public final static String traceback___new___doc = 
+        "T.__new__(S, ...) -> a new object with type S, a subtype of T";
+
+    public final static String traceback___reduce___doc = 
+        "helper for pickle";
+
+    public final static String traceback___reduce_ex___doc = 
+        "helper for pickle";
+
+    public final static String traceback___repr___doc = 
+        "x.__repr__() <==> repr(x)";
+
+    public final static String traceback___setattr___doc = 
+        "x.__setattr__('name', value) <==> x.name = value";
+
+    public final static String traceback___sizeof___doc = 
+        "__sizeof__() -> int\n" + 
+        "size of object in memory, in bytes";
+
+    public final static String traceback___str___doc = 
+        "x.__str__() <==> str(x)";
+
+    public final static String traceback___subclasshook___doc = 
+        "Abstract classes can override this to customize issubclass().\n" + 
+        "\n" + 
+        "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" + 
+        "It should return True, False or NotImplemented.  If it returns\n" + 
+        "NotImplemented, the normal algorithm is used.  Otherwise, it\n" + 
+        "overrides the normal algorithm (and the outcome is cached).\n" + 
+        "";
+
+    public final static String traceback_tb_frame_doc = 
+        "";
+
+    public final static String traceback_tb_lasti_doc = 
+        "";
+
+    public final static String traceback_tb_lineno_doc = 
+        "";
+
+    public final static String traceback_tb_next_doc = 
+        "";
+
+}
diff --git a/src/org/python/core/PyByteArray.java b/src/org/python/core/PyByteArray.java
new file mode 100644
--- /dev/null
+++ b/src/org/python/core/PyByteArray.java
@@ -0,0 +1,1358 @@
+package org.python.core;
+
+import java.util.Arrays;
+
+import org.python.expose.ExposedMethod;
+import org.python.expose.ExposedNew;
+import org.python.expose.ExposedType;
+
+/**
+ * Partial implementation of Python bytearray. At the present stage of development, the class
+ * provides:
+ * <ul>
+ * <li>constructors (both __init__ and the Java API constructors),</li>
+ * <li>the slice operations (get, set and delete)</li>
+ * <li>a <code>List&lt;PyInteger&gt;</code> implementation for the Java API</li>
+ * </ul>
+ * and this is founded on a particular approach to storage management internally. However, the
+ * implementation does not support the <code>memoryview</code> interface either for access or a a
+ * source for its constructors although the signatures are present. The rich set of string-like
+ * operations due a <code>bytearray</code> is not implemented.
+ * 
+ */
+ at ExposedType(name = "bytearray", base = PyObject.class, doc = BuiltinDocs.bytearray_doc)
+public class PyByteArray extends BaseBytes {
+
+    public static final PyType TYPE = PyType.fromClass(PyByteArray.class);
+    
+    /**
+     * Create a zero-length Python bytearray of explicitly-specified sub-type
+     * @param type explicit Jython type
+     */
+    public PyByteArray(PyType type) {
+        super(type);
+    }
+    
+    /**
+     * Create a zero-length Python bytearray.
+     */
+    public PyByteArray() {
+        super(TYPE);
+    }
+
+    /**
+     * Create zero-filled Python bytearray of specified size.
+     * @param size of bytearray
+     */
+    public PyByteArray(int size) {
+        super(TYPE);
+        init(size);
+    }
+
+    /**
+     * Construct bytearray by copying values from int[].
+     * 
+     * @param value source of the bytes (and size)
+     */
+    public PyByteArray(int[] value) {
+        super(TYPE, value);
+    }
+
+    /**
+     * Create a new array filled exactly by a copy of the contents of the
+     * source.
+     * @param value source of the bytes (and size)
+     */
+    public PyByteArray(BaseBytes value) {
+        super(TYPE);
+        init(value);
+    }
+    
+    /**
+     * Create a new array filled exactly by a copy of the contents of the
+     * source.
+     * @param value source of the bytes (and size)
+     */
+    public PyByteArray(MemoryViewProtocol value) {
+        super(TYPE);
+        init(value.getMemoryView());
+    }
+    
+    /**
+     * Create a new array filled from an iterable of PyObject. The iterable must yield objects
+     * convertible to Python bytes (non-negative integers less than 256 or strings of length 1).
+     * @param value source of the bytes (and size)
+     */
+    public PyByteArray(Iterable<? extends PyObject> value) {
+        super(TYPE);
+        init(value);
+    }
+    
+    /**
+     * Create a new array by encoding a PyString argument to bytes. If the PyString is actually a
+     * PyUnicode, the encoding must be explicitly specified.
+     * 
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding (must be a string type)
+     * @param errors name of optional errors policy (must be a string type)
+     */
+    public PyByteArray(PyString arg, PyObject encoding, PyObject errors) {
+        super(TYPE);
+        init(arg, encoding, errors);
+    }
+
+    /**
+     * Create a new array by encoding a PyString argument to bytes. If the PyString is actually a
+     * PyUnicode, the encoding must be explicitly specified.
+     * 
+     * @param arg primary argument from which value is taken
+     * @param encoding name of optional encoding (may be null to select the default for this
+     *            installation)
+     * @param errors name of optional errors policy
+     */
+    public PyByteArray(PyString arg, String encoding, String errors) {
+        super(TYPE);
+        init(arg, encoding, errors);
+    }
+
+    /**
+     * Create a new bytearray object from an arbitrary Python object according to the same rules as
+     * apply in Python to the bytearray() constructor:
+     * <ul>
+     * <li>bytearray() Construct a zero-length bytearray (arg is null).</li>
+     * <li>bytearray(int) Construct a zero-initialized bytearray of the given length.</li>
+     * <li>bytearray(iterable_of_ints) Construct from iterable yielding integers in [0..255]</li>
+     * <li>bytearray(string [, encoding [, errors] ]) Construct from a text string, optionally using
+     * the specified encoding.</li>
+     * <li>bytearray(unicode, encoding [, errors]) Construct from a unicode string using the
+     * specified encoding.</li>
+     * <li>bytearray(bytes_or_bytearray) Construct as a mutable copy of bytes or existing bytearray
+     * object.</li>
+     * </ul>
+     * When it is necessary to specify an encoding, as in the Python signature
+     * <code>bytearray(string, encoding[, errors])</code>, use the constructor
+     * {@link #PyByteArray(PyString, String, String)}. If the PyString is actually a PyUnicode, an
+     * encoding must be specified, and using this constructor will throw an exception about that.
+     * 
+     * @param arg primary argument from which value is taken (may be null)
+     * @throws PyException in the same circumstances as bytearray(arg), TypeError for non-iterable,
+     * non-integer argument type, and ValueError if iterables do not yield byte [0..255] values.
+     */
+    public PyByteArray(PyObject arg) throws PyException {
+        super(TYPE);
+        init(arg);
+    }
+    
+    /* ========================================================================================
+     * API for org.python.core.PySequence
+     * ========================================================================================
+     */
+
+    /**
+     * Returns a slice of elements from this sequence as a PyByteArray.
+     *
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @return a PyByteArray corresponding the the given range of elements.
+     */
+    @Override
+    protected synchronized PyByteArray getslice(int start, int stop, int step) {
+        if (step == 1) {
+            // Efficiently copy contiguous slice
+            int n = stop-start;
+            if (n<=0) {
+                return new PyByteArray();
+            } else {
+                PyByteArray ret = new PyByteArray(n);
+                System.arraycopy(storage, offset+start, ret.storage, ret.offset, n);
+                return ret;
+            }
+        } else {
+            int n = sliceLength(start, stop, step);
+            PyByteArray ret = new PyByteArray(n);
+            n += ret.offset;
+            byte[] dst = ret.storage;
+            for (int io = start + offset, jo = ret.offset; jo < n; io += step, jo++)
+                dst[jo] = storage[io];
+            return ret;
+        }
+    }
+
+    
+    /**
+     * Returns a PyByteArray that repeats this  sequence the given number of times, as
+     * in the implementation of <tt>__mul__</tt> for strings.
+     * @param count the number of times to repeat this.
+     * @return this byte array repeated count times.
+     */
+    @Override
+    protected synchronized PyByteArray repeat(int count) {
+        PyByteArray ret = new PyByteArray();
+        ret.setStorage(repeatImpl(count));
+        return ret;
+    }    
+
+    /**
+     * Sets the indexed element of the bytearray to the given value.
+     * This is an extension point called by PySequence in its implementation of
+     * {@link #__setitem__}
+     * It is guaranteed by PySequence that the index is within the bounds of the array.
+     * Any other clients calling <tt>pyset(int)</tt> must make the same guarantee.
+     *
+     * @param index index of the element to set.
+     * @param value the value to set this element to.
+     * @throws PyException(AttributeError) if value cannot be converted to an integer
+     * @throws PyException(ValueError) if value<0 or value>255
+     */
+    public synchronized void pyset(int index, PyObject value) throws PyException {
+        storage[index+offset] = byteCheck(value); 
+    }
+
+    /**
+     * Insert the element (interpreted as a Python byte value) at the given index.
+     * 
+     * @param index to insert at
+     * @param element to insert (by value)
+     * @throws PyException(IndexError) if the index is outside the array bounds
+     * @throws PyException(ValueError) if element<0 or element>255
+     */
+    public synchronized void pyadd(int index, PyInteger element) {
+        // Open a space at the right location.
+        storageReplace(index, 0, 1);
+        storage[index] = byteCheck(element); 
+    }
+    
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics. If the step
+     * size is one, it is a simple slice and the operation is equivalent to deleting that slice,
+     * then inserting the value at that position, regarding the value as a sequence (if possible) or
+     * as a single element if it is not a sequence. If the step size is not one, but start=stop, it
+     * is equivalent to insertion at that point. If the step size is not one, and start!=stop, the
+     * slice defines a certain number of elements to be replaced, and the value must be a sequence
+     * of exactly that many elements (or convertible to such a sequence).
+     * <p>
+     * When assigning from a sequence type or iterator, the sequence may contain arbitrary
+     * <code>PyObject</code>s, but acceptable ones are PyInteger, PyLong or PyString of length 1. If
+     * any one of them proves unsuitable for assignment to a Python bytarray element, an exception
+     * is thrown and this bytearray is unchanged.
+     * 
+     * <pre>
+     * a = bytearray(b'abcdefghijklmnopqrst')
+     * a[2:12:2] = iter( [65, 66, 67, long(68), "E"] )
+     * </pre>
+     * 
+     * Results in <code>a=bytearray(b'abAdBfChDjElmnopqrst')</code>.
+     * <p>
+     * 
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param value an object consistent with the slice assignment
+     */
+    @Override
+    protected synchronized void setslice(int start, int stop, int step, PyObject value) {
+
+        if (step == 1 && stop < start) {
+            // Because "b[5:2] = v" means insert v just before 5 not 2.
+            // ... although "b[5:2:-1] = v means b[5]=v[0], b[4]=v[1], b[3]=v[2]
+            stop = start;
+        }
+
+        /*
+         * The actual behaviour depends on the nature (type) of value. It may be any kind of
+         * PyObject (but not other kinds of Java Object). The function is implementing assignment to
+         * a slice. PEP 3137 declares that the value may be "any type that implements the PEP 3118
+         * buffer interface, which isn't implemented yet in Jython.
+         */
+        // XXX correct this when the buffer interface is available in Jython
+        /*
+         * The following is essentially equivalent to b[start:stop[:step]]=bytearray(value) except
+         * we avoid constructing a copy of value if we can easily do so. The logic is the same as
+         * BaseBytes.init(PyObject), without support for value==null.
+         */
+
+        if (value instanceof PyString) {
+            /*
+             * Value is a string (but must be 8-bit).
+             */
+            setslice(start, stop, step, (PyString)value);
+
+        } else if (value.isIndex()) {
+            /*
+             * Value behaves as a zero-initialised bytearray of the given length.
+             */
+            setslice(start, stop, step, value.asIndex(Py.OverflowError));
+
+        } else if (value instanceof BaseBytes) {
+            /*
+             * Value behaves as a bytearray, and can be can be inserted without making a copy
+             * (unless it is this object).
+             */
+            setslice(start, stop, step, (BaseBytes)value);
+
+        } else if (value instanceof MemoryViewProtocol) {
+            /*
+             * Value supports Jython implementation of PEP 3118, and can be can be inserted without
+             * making a copy.
+             */
+            setslice(start, stop, step, ((MemoryViewProtocol)value).getMemoryView());
+
+        } else {
+            /*
+             * The remaining alternative is an iterable returning (hopefully) right-sized ints. If
+             * it isn't one, we get an exception about not being iterable, or about the values.
+             */
+            setslice(start, stop, step, value.asIterable());
+
+        }
+    }
+
+
+
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics from a
+     * zero-filled bytearray of the given length.
+     * 
+     * @see #setslice(int, int, int, PyObject)
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param len number of zeros to insert consistent with the slice assignment
+     * @throws PyException(SliceSizeError) if the value size is inconsistent with an extended slice
+     */
+    private void setslice(int start, int stop, int step, int len) throws PyException {
+        if (step == 1) {
+            // Delete this[start:stop] and open a space of the right size = len
+            storageReplace(start, stop - start, len);
+            Arrays.fill(storage, start + offset, (start + offset) + len, (byte)0);
+
+        } else {
+            // This is an extended slice which means we are replacing elements
+            int n = sliceLength(start, stop, step);
+            if (n != len) throw SliceSizeError("bytes", len, n);
+            for (int io = start + offset; n > 0; io += step, --n)
+                storage[io] = 0;
+        }
+    }
+
+
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics from a
+     * PyString.
+     * 
+     * @see #setslice(int, int, int, PyObject)
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param value a PyString object consistent with the slice assignment
+     * @throws PyException(SliceSizeError) if the value size is inconsistent with an extended slice
+     */
+    private void setslice(int start, int stop, int step, PyString value) throws PyException {
+        String v = value.asString();
+        int len = v.length();
+        if (step == 1) {
+            // Delete this[start:stop] and open a space of the right size
+            storageReplace(start, stop - start, len);
+            setBytes(start, v);
+        } else {
+            // This is an extended slice which means we are replacing elements
+            int n = sliceLength(start, stop, step);
+            if (n != len) {
+                throw SliceSizeError("bytes", len, n);
+            }
+            setBytes(start, step, v);
+        }
+    }
+
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics from an
+     * object supporting the Jython implementation of PEP 3118.
+     * 
+     * @see #setslice(int, int, int, PyObject)
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param value a memoryview object consistent with the slice assignment
+     * @throws PyException(SliceSizeError) if the value size is inconsistent with an extended slice
+     */
+    private void setslice(int start, int stop, int step, MemoryView value) throws PyException {
+        // XXX Support memoryview once means of access to bytes is defined
+        Py.NotImplementedError("memoryview not yet supported in bytearray");
+        String format = value.get_format();
+        boolean isBytes = format == null || "B".equals(format);
+        if (value.get_ndim() != 1 || !isBytes) {
+            Py.TypeError("memoryview value must be byte-oriented");
+        } else {
+            // Dimensions are given as a PyTple (although only one)
+            int len = value.get_shape().pyget(0).asInt();
+            if (step == 1) {
+                // Delete this[start:stop] and open a space of the right size
+                storageReplace(start, stop - start, len);
+                // System.arraycopy(value.storage, value.offset, storage, start
+                // + offset, len);
+            } else {
+                // This is an extended slice which means we are replacing elements
+                int n = sliceLength(start, stop, step);
+                if (n != len) throw SliceSizeError("bytes", len, n);
+                // int no = n + value.offset;
+                // for (int io = start + offset, jo = value.offset; jo < no; io += step, jo++) {
+                // storage[io] = value.storage[jo]; // Assign this[i] = value[j]
+                // }
+            }
+        }
+    }
+
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics
+     * from a bytearray (or bytes).
+     * @see #setslice(int, int, int, PyObject)
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param value a bytearray (or bytes) object consistent with the slice assignment
+     * @throws PyException(SliceSizeError) if the value size is inconsistent with an extended slice
+     */
+    private void setslice(int start, int stop, int step, BaseBytes value) throws PyException {
+        if (value == this) {
+            value = new PyByteArray(value);  // Must work with a copy
+        }
+        int len = value.size;
+        if (step == 1) {
+            //Delete this[start:stop] and open a space of the right size
+            storageReplace(start, stop - start, len);
+            System.arraycopy(value.storage, value.offset, storage, start
+                    + offset, len);
+        } else {
+            // This is an extended slice which means we are replacing elements
+            int n = sliceLength(start, stop, step);
+            if (n != len) {
+                throw SliceSizeError("bytes", len, n);
+            }
+            int no = n + value.offset;
+            for (int io = start + offset, jo = value.offset; jo < no; io += step, jo++) {
+                storage[io] = value.storage[jo];    // Assign this[i] = value[j]
+            }
+        }
+    }
+
+
+    /**
+     * Sets the given range of elements according to Python slice assignment semantics from a
+     * bytearray (or bytes).
+     * 
+     * @see #setslice(int, int, int, PyObject)
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step the step size.
+     * @param iter iterable source of values to enter in the array
+     * @throws PyException(SliceSizeError) if the iterable size is inconsistent with an extended
+     *             slice
+     */
+    private void setslice(int start, int stop, int step, Iterable<? extends PyObject> iter) {
+        /*
+         * As we don't know how many elements the iterable represents, we can't adjust the array
+         * until after we run the iterator. We use this elastic byte structure to hold the bytes until then.
+         */
+        FragmentList fragList = new BaseBytes.FragmentList();
+        fragList.loadFrom(iter);
+
+        if (step == 1) {
+            // Delete this[start:stop] and open a space of the right size
+            storageReplace(start, stop - start, fragList.totalCount);
+            if (fragList.totalCount > 0) {
+                // Stitch the fragments together in the space we made
+                fragList.emptyInto(storage, start + offset);
+            }
+        } else {
+            // This is an extended slice which means we are replacing elements
+            int n = sliceLength(start, stop, step);
+            if (n != fragList.totalCount) throw SliceSizeError("bytes", fragList.totalCount, n);
+            fragList.emptyInto(storage, start + offset, step);
+        }
+    }
+
+
+// Idiom:    
+//    if (step == 1) {
+//        // Do something efficient with block start...stop-1
+//    } else {
+//        int n = sliceLength(start, stop, step);
+//        for (int i = start, j = 0; j < n; i += step, j++) {
+//            // Perform jth operation with element i
+//        }
+//    }
+    
+    
+    
+    /*
+     * Deletes an element from the sequence (and closes up the gap).
+     * @param index index of the element to delete.
+     */
+    protected synchronized void del(int index) {
+        // XXX Change SequenceIndexDelegate to avoid repeated calls to del(int) for extended slice
+        storageDelete(index, 1);
+    }
+
+    /*
+     * Deletes contiguous sub-sequence (and closes up the gap).
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     */
+    protected synchronized void delRange(int start, int stop) {
+        // XXX Use the specialised storageDelete()
+        storageReplace(start, stop-start, 0);
+    }
+
+    /**
+     * Deletes a simple or extended slice and closes up the gap(s).
+     * 
+     * @param start the position of the first element.
+     * @param stop one more than the position of the last element.
+     * @param step from one element to the next
+     */
+    protected synchronized void delslice(int start, int stop, int step) {
+        if (step == 1) {
+            // Delete this[start:stop] and closing up the space
+            storageDelete(start, stop - start);
+        } else {
+            // This is an extended slice which means we are removing isolated elements
+            int n = sliceLength(start, stop, step);
+
+            if (n > 0) {
+                if (step > 0) {
+                    // The first element is x[start] and the last is x[start+(n-1)*step+1]
+                    storageDeleteEx(start, step, n);
+                } else {
+                    // The first element is x[start+(n-1)*step+1] and the last is x[start]
+                    storageDeleteEx(start + (n - 1) * step + 1, -step, n);
+                }
+            }
+        }
+    }
+
+    /**
+     * Convenience method to create a <code>ValueError</code> PyException with the message
+     * "attempt to assign {type} of size {valueSize} to extended slice of size {sliceSize}"
+     * 
+     * @param valueType
+     * @param valueSize size of sequence being assigned to slice
+     * @param sliceSize size of slice expected to receive
+     * @throws PyException (ValueError) as detailed
+     */
+    public static PyException SliceSizeError(String valueType, int valueSize, int sliceSize)
+            throws PyException {
+        String fmt = "attempt to assign %s of size %d to extended slice of size %d";
+        return Py.ValueError(String.format(fmt, valueType, valueSize, sliceSize));
+        // XXX consider moving to SequenceIndexDelegate.java or somewhere else generic
+    }
+
+
+    /**
+     * Initialise a mutable bytearray object from various arguments. This single initialisation must
+     * support:
+     * <ul>
+     * <li>bytearray() Construct a zero-length bytearray.</li>
+     * <li>bytearray(int) Construct a zero-initialized bytearray of the given length.</li>
+     * <li>bytearray(iterable_of_ints) Construct from iterable yielding integers in [0..255]</li>
+     * <li>bytearray(string [, encoding [, errors] ]) Construct from a text string, optionally using
+     * the specified encoding.</li>
+     * <li>bytearray(unicode, encoding [, errors]) Construct from a unicode string using the
+     * specified encoding.</li>
+     * <li>bytearray(bytes_or_bytearray) Construct as a mutable copy of bytes or existing bytearray
+     * object.</li>
+     * </ul>
+     * Unlike CPython we are not able to support the initialisation: <li>bytearray(memory_view)
+     * Construct as copy of any object implementing the buffer API.</li> </ul> Although effectively
+     * a constructor, it is possible to call __init__ on a 'used' object so the method does not
+     * assume any particular prior state.
+     * 
+     * @param args argument array according to Jython conventions
+     * @param kwds Keywords according to Jython conventions 
+     * @throws PyException in the same circumstances as bytearray(arg), TypeError for non-iterable,
+     * non-integer argument type, and ValueError if iterables do not yield byte [0..255] values.
+     */
+    @ExposedNew
+    @ExposedMethod(doc = BuiltinDocs.bytearray___init___doc)
+    final synchronized void bytearray___init__(PyObject[] args, String[] kwds) {
+        
+        ArgParser ap = new ArgParser("bytearray", args, kwds, "source", "encoding", "errors");        
+        PyObject arg = ap.getPyObject(0, null);
+        // If not null, encoding and errors must be PyString (or PyUnicode)
+        PyObject encoding = ap.getPyObjectByType(1, PyBaseString.TYPE, null);
+        PyObject errors = ap.getPyObjectByType(2, PyBaseString.TYPE, null);
+
+        /*
+         * This whole method is modelled on CPython (see Objects/bytearrayobject.c : bytes_init())
+         * but reorganised somewhat to maximise re-use with the implementation of assignment to a
+         * slice, which essentially has to construct a bytearray from the right-hand side.
+         * Hopefully, it still tries the same things in the same order and fails in the same way.
+         */
+
+        if (encoding != null || errors != null) {
+            /*
+             * bytearray(string [, encoding [, errors]]) Construct from a text string by encoding it
+             * using the specified encoding.
+             */
+            if (arg == null || !(arg instanceof PyString)) {
+                throw Py.TypeError("encoding or errors without sequence argument");
+            }
+            init((PyString)arg, encoding, errors);
+            
+        } else {
+            // Now construct from arbitrary object (or null)
+            init(arg);
+        }
+
+    }
+    
+    
+    @Override
+    public int __len__() {
+        return list___len__();
+    }
+
+    @ExposedMethod(doc = BuiltinDocs.list___len___doc)
+    final int list___len__() {
+        return size;
+    }
+
+    
+// Based on PyList and not yet properly implemented.
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___ne___doc)
+//    final synchronized PyObject bytearray___ne__(PyObject o) {
+//        return seq___ne__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___eq___doc)
+//    final synchronized PyObject bytearray___eq__(PyObject o) {
+//        return seq___eq__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___lt___doc)
+//    final synchronized PyObject bytearray___lt__(PyObject o) {
+//        return seq___lt__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___le___doc)
+//    final synchronized PyObject bytearray___le__(PyObject o) {
+//        return seq___le__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___gt___doc)
+//    final synchronized PyObject bytearray___gt__(PyObject o) {
+//        return seq___gt__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___ge___doc)
+//    final synchronized PyObject bytearray___ge__(PyObject o) {
+//        return seq___ge__(o);
+//    }
+//
+//    @Override
+//    public PyObject __imul__(PyObject o) {
+//        return bytearray___imul__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___imul___doc)
+//    final synchronized PyObject bytearray___imul__(PyObject o) {
+//        if (!o.isIndex()) {
+//            return null;
+//        }
+//        int count = o.asIndex(Py.OverflowError);
+//
+//        int size = size();
+//        if (size == 0 || count == 1) {
+//            return this;
+//        }
+//
+//        if (count < 1) {
+//            clear();
+//            return this;
+//        }
+//
+//        if (size > Integer.MAX_VALUE / count) {
+//            throw Py.MemoryError("");
+//        }
+//
+//        int newSize = size * count;
+//        if (storage instanceof ArrayList) {
+//            ((ArrayList) storage).ensureCapacity(newSize);
+//        }
+//        List<PyObject> oldList = new ArrayList<PyObject>(storage);
+//        for (int i = 1; i < count; i++) {
+//            storage.addAll(oldList);
+//        }
+//        gListAllocatedStatus = storage.size(); // now omit?
+//        return this;
+//    }
+//
+//    @Override
+//    public PyObject __mul__(PyObject o) {
+//        return bytearray___mul__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___mul___doc)
+//    final synchronized PyObject bytearray___mul__(PyObject o) {
+//        if (!o.isIndex()) {
+//            return null;
+//        }
+//        return repeat(o.asIndex(Py.OverflowError));
+//    }
+//
+//    @Override
+//    public PyObject __rmul__(PyObject o) {
+//        return bytearray___rmul__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___rmul___doc)
+//    final synchronized PyObject bytearray___rmul__(PyObject o) {
+//        if (!o.isIndex()) {
+//            return null;
+//        }
+//        return repeat(o.asIndex(Py.OverflowError));
+//    }
+//
+//    @Override
+//    public PyObject __add__(PyObject o) {
+//        return bytearray___add__(o);
+//    }
+//
+//    @ExposedMethod(type = MethodType.BINARY, doc = BuiltinDocs.bytearray___add___doc)
+//    final synchronized PyObject bytearray___add__(PyObject o) {
+//        PyByteArray sum = null;
+//        if (o instanceof PySequenceList && !(o instanceof PyTuple)) {
+//            if (o instanceof PyByteArray) {
+//                List oList = ((PyByteArray) o).storage;
+//                List newList = new ArrayList(storage.size() + oList.size());
+//                newList.addAll(storage);
+//                newList.addAll(oList);
+//                sum = fromList(newList);
+//            }
+//        } else if (!(o instanceof PySequenceList)) {
+//            // also support adding java lists (but not PyTuple!)
+//            Object oList = o.__tojava__(List.class);
+//            if (oList != Py.NoConversion && oList != null) {
+//                List otherList = (List) oList;
+//                sum = new PyByteArray();
+//                sum.bytearray_extend(this);
+//                for (Iterator i = otherList.iterator(); i.hasNext();) {
+//                    sum.add(i.next());
+//                }
+//            }
+//        }
+//        return sum;
+//    }
+//
+//    @ExposedMethod(doc = BuiltinDocs.bytearray___contains___doc)
+//    final synchronized boolean bytearray___contains__(PyObject o) {
+//        return object___contains__(o);
+//    }
+//
+//    @ExposedMethod(doc = BuiltinDocs.bytearray___delitem___doc)
+//    final synchronized void bytearray___delitem__(PyObject index) {
+//        seq___delitem__(index);
+//    }
+//
+    @ExposedMethod(doc = BuiltinDocs.bytearray___setitem___doc)
+    final synchronized void bytearray___setitem__(PyObject o, PyObject def) {
+        seq___setitem__(o, def);
+    }
+
+//    @ExposedMethod(doc = BuiltinDocs.bytearray___getitem___doc)
+//    final synchronized PyObject bytearray___getitem__(PyObject o) {
+//        PyObject ret = seq___finditem__(o);
+//        if (ret == null) {
+//            throw Py.IndexError("index out of range: " + o);
+//        }
+//        return ret;
+//    }
+//
+//    @Override
+//    public PyObject __iter__() {
+//        return bytearray___iter__();
+//    }
+//
+//    @ExposedMethod(doc = BuiltinDocs.bytearray___iter___doc)
+//    public synchronized PyObject bytearray___iter__() {
+//        return new PyFastSequenceIter(this);
+//    }
+//
+//    @Override
+//    protected String unsupportedopMessage(String op, PyObject o2) {
+//        if (op.equals("+")) {
+//            return "can only concatenate storage (not \"{2}\") to storage";
+//        }
+//        return super.unsupportedopMessage(op, o2);
+//    }
+//
+//    public String toString() {
+//        return bytearray_toString();
+//    }
+//
+    @ExposedMethod(names = "__repr__", doc = BuiltinDocs.bytearray___repr___doc)
+    final synchronized String bytearray_toString() {
+        // XXX revisit: understand the thread state logic and use encode()
+//        ThreadState ts = Py.getThreadState();
+//        if (!ts.enterRepr(this)) {
+//            return "[...]";
+//        }
+        StringBuilder buf = new StringBuilder("bytearray(b'");
+        final int last = size()-1;
+        for (int i=0; i<=last; i++) {
+            int element = intAt(i);
+            if (Character.isISOControl(element))
+                buf.append(String.format("\\x%02x", element));
+            else
+                buf.append((char)element);
+        }
+        buf.append("')");
+//        ts.exitRepr(this);
+        return buf.toString();
+    }
+
+    
+    
+    
+    
+    /*
+     * ========================================================================================
+     * Manipulation of storage capacity
+     * ========================================================================================
+     * 
+     * Here we add to the inherited variables defining byte storage, the methods necessary to resize
+     * it.
+     */    
+   
+    /**
+     * Choose a size appropriate to store the given number of bytes, with some room for growth.
+     * @param size
+     * @return n >= needed
+     */
+    private static final int roundUp(int size) {
+        // XXX Consider equivalent case statement
+        int alloc = size + (size >> 3) + (size < 9 ? 3 : 6);    // As CPython
+        // XXX What's a good allocation unit size here?
+        final int ALLOC = 8;
+        return (alloc+(ALLOC-1)) & ~(ALLOC-1);                  // round up to multiple of ALLOC
+    }
+    
+    /**
+     * Used mainly to prevent repeated attempts to shrink an array that is already minimal.
+     */
+    private static final int minAlloc = roundUp(1);
+        
+    /**
+     * Decide whether a new storage array should be allocated (but don't do it). This method returns
+     * true if the needed storage is bigger than the allocated array length.
+     * 
+     * @param needed number of bytes needed
+     * @return true if needed number of bytes justifies a new array
+     */
+    private final boolean shouldGrow(int needed) {
+        return needed > storage.length;
+    }
+
+    /**
+     * Decide whether a smaller storage array should be allocated (but don't do it). This method
+     * returns true if the needed storage size is much smaller than the allocated array length.
+     * 
+     * @param needed number of bytes needed
+     * @return true if needed number of bytes justifies a new array
+     */
+    private final boolean shouldShrink(int needed) {
+        return needed == 0 || (needed * 2 + minAlloc) < storage.length;
+    }
+
+    /**
+     * Decide whether a new storage array should be allocated (but don't do it). This method returns
+     * true if the needed storage is bigger, or much smaller, than the allocated array length.
+     * 
+     * @param needed number of bytes needed
+     * @return true if needed number of bytes justifies a new array
+     */
+    private final boolean shouldResize(int needed) {
+        return shouldGrow(needed) || shouldShrink(needed);
+    }
+
+    /**
+     * Allocate fresh storage for at least the requested number of bytes. Spare bytes are alloceted
+     * evenly at each end of the new storage by choice of a new value for offset.
+     * If the size needed is zero, the "storage" allocated is the shared emptyStorage array.
+     * @param needed becomes the new value of this.size
+     */
+    protected void newStorage(int needed) {
+        if (needed > 0) {
+            byte[] s = new byte[roundUp(needed)]; // guaranteed zero (by JLS 2ed para 4.5.5)
+            setStorage(s, needed, (s.length - needed) / 2);
+        } else
+            setStorage(emptyStorage);
+    }
+
+    /**
+     * Ensure there is storage for at least the requested number of bytes, optionally clearing
+     * elements to zero. After the call, the needed number of bytes will be available,
+     * and if requested in the second parameter, they are guaranteed to be zero.
+     * @param needed number of bytes
+     * @param clear if true, storage bytes guaranteed zero
+     */
+    private void newStorage(int needed, boolean clear) {
+        if (shouldResize(needed)) {
+            newStorage(needed);                 // guaranteed zero
+        } else {
+            setStorage(storage, needed, (storage.length - needed) / 2);
+            if (clear) {
+                Arrays.fill(storage, (byte)0); // guarantee zero
+            }
+        }
+    }
+
+
+    
+    /**
+     * Delete <code>d</code> elements at index <code>a</code> and prepare to insert
+     * <code>e</code> elements there by moving aside the surrounding elements.
+     * The method manipulates the <code>storage</code> array contents, <code>size</code> and
+     * <code>offset</code>. It will allocate a new array <code>storage</code> if necessary,
+     * or if desirable for efficiency. If the initial storage looks like this:
+     * <pre>
+     *       |-                  s                -|
+     * |--f--|--------a--------|---d---|-----b-----|----------------|
+     * </pre>
+     * then after the call the (possibly new) storage looks like this:
+     * <pre>
+     *            |-                   s'                -|
+     * |----f'----|--------a--------|----e----|-----b-----|--------------|
+     * </pre>
+     * where the contents of regions of length <code>a</code> and <code>b=size-(a+d)</code> have
+     * been preserved, although probably moved, and the gap between them has been adjusted to
+     * the requested size.
+     * <p>
+     * The effect on this PyByteArray is that:
+     * <pre>
+     * this.offset = f'
+     * this.size = s' = a + e + b
+     * </pre>
+     * The method does not implement the Python repertoire of slice indices but avoids indexing
+     * outside the bytearray by silently adjusting a to be within it.
+     * Negative d or e is treated as 0 and if d is too large, it is truncated to the array end.
+     * @param a index of hole in byte array 
+     * @param d number to discard (will discard x[a,a+d-1])
+     * @param e size of hole to open (will be x[a, a+e-1])
+     */
+    private void storageReplace(int a, int d, int e) {
+
+        int s = this.size;
+
+        // Some of these should perhaps be errors but let's silently correct insane requests
+        if (a<0) a=0; else if (a>s) a = s;
+        if (d<0) d=0; else if (d>s-a) d = s-a;
+        if (e<0) e=0;
+
+        if (e != d) {
+            // Otherwise, everything stays where it is.
+            // Handy derived values:
+            int b = s - (a + d);    // which is >= 0
+            int s2 = a + e + b;     // which is >= 0
+            int f = this.offset;    // Location of x[0]
+            int g = f + (a + d);    // Location of x[-b]
+            
+            if (shouldShrink(s2)) {
+                if (s2 > 0) {
+                    // We have far more storage than we need: shrink and copy both parts
+                    newStorage(f, a, g, b, e);
+                } else {
+                    // Need no storage as a+e+b = 0
+                    setStorage(emptyStorage);
+                }
+
+            } else if (a < b) {
+                // It would be less copying if we moved A=x[:a] not B=x[-b:].
+                // If B is to stay where it is, it means A will land here:
+                int f2 = f - (e - d);
+                if (f2 >= 0) {
+                    // ... which luckily is still inside the array
+                    if (a > 0) {
+                        System.arraycopy(storage, f, storage, f2, a);
+                    }
+                    this.offset = f2;
+                    size = s2;
+                } else {
+                    // ... which unfortunately is before the start of the array.
+                    // We have to move both A and B and it might be time for a new array.
+                    if (s2<=storage.length) {
+                        // Repack it all in the existing array
+                        newStorageAvoided(f, a, g, b, e);
+                    } else {
+                        newStorage(f, a, g, b, e);
+                    }
+                }
+
+            } else /* a >= b */{
+                // It would be less copying if we moved B=x[-b:] not A=x[:a]
+                // If A is to stay where it is, it means B will land here:
+                int g2 = g + (e - d);
+                if (g2 + b <= storage.length) {
+                    // ... which luckily leaves all of B inside the array
+                    if (b > 0) {
+                        System.arraycopy(storage, g, storage, g2, b);
+                    }
+                    // this.offset is unchanged
+                    size = s2;
+                } else {
+                    // ... which unfortunately runs beyond the end of the array.
+                    // We have to move both A and B and it might be time for a new array.
+                    if (s2<=storage.length) {
+                        // Repack it all in the existing array
+                        newStorageAvoided(f, a, g, b, e);
+                    } else {
+                        newStorage(f, a, g, b, e);
+                    }
+                }
+            }
+        }
+
+    }
+    
+   
+    /**
+     * Use the existing storage but move two blocks within it to leave a gap of the required size.
+     * This is the strategy usually used when the array is still big enough to hold the required
+     * new value, but we can't leave either block fixed.
+     * If the initial storage looks like this:
+     * 
+     * <pre>
+     * |-----f-----|--------a--------|---d---|----------b----------|----------|
+     * </pre>
+     * 
+     * then after the call the storage looks like this:
+     * 
+     * <pre>
+     *        |-                             s'                          -|
+     * |--f'--|--------a--------|---------e---------|----------b----------|---|
+     * </pre>
+     * 
+     * where the regions of length <code>a</code> and <code>b=size-(a+d)</code> have been preserved
+     * and the gap between them adjusted to specification. The new offset f' is chosen heuristically
+     * by the method to optimise the efficiency of repeated adjustment near either end of the array,
+     * e.g. repeated prepend or append operations. The effect on this PyByteArray is that:
+     * 
+     * <pre>
+     * this.offset = f'
+     * this.size = s' = a+e+b
+     * </pre>
+     * 
+     * Arguments are not checked for validity <b>at all</b>.
+     * a, e and b are non-negative and not all zero.
+     * 
+     * @param f location (with offset) of A
+     * @param a length of A
+     * @param g = f+a+d location (with offset) of B
+     * @param b length of B
+     * @param e gap between A and B in new storage.
+     */
+    private void newStorageAvoided(int f, int a, int g, int b, int e) {
+
+        // Shorthands
+        int s2 = a + e + b;
+
+        // Choose the new offset f' to make prepend or append operations quicker.
+        // E.g. if insertion was near the end (b small) put most of the new space at the end.
+        int f2;
+        if (a == b) {
+            // Mainly to trap the case a=b=0
+            f2 = (storage.length - s2) / 2;
+        } else {
+            // a and b are not both zero (since not equal)
+            long spare = storage.length - s2;
+            f2 = (int)((spare * b) / (a + b));
+        }
+        // We have a new size and offset (but the same storage)
+        size = s2;
+        offset = f2;
+        
+        // This puts B at
+        int g2 = f2 + a + e;
+
+        // We can make do with the existing array. Do an in place copy.
+        if (f2 + a > g) {
+            // New A overlaps existing B so we must copy B first
+            if (b > 0) System.arraycopy(storage, g, storage, g2, b);
+            if (a > 0) System.arraycopy(storage, f, storage, f2, a);
+        } else {
+            // Safe to copy A first
+            if (a > 0) System.arraycopy(storage, f, storage, f2, a);
+            if (b > 0) System.arraycopy(storage, g, storage, g2, b);
+        }
+
+    }
+    
+
+    /**
+     * Allocate new storage and copy two blocks from the current storage to it. If the initial
+     * storage looks like this:
+     * 
+     * <pre>
+     * |--f--|--------a--------|---d---|-----b-----|----------------|
+     * </pre>
+     * 
+     * then after the call the (definitely new) storage looks like this:
+     * 
+     * <pre>
+     *            |-                   s'                -|
+     * |----f'----|--------a--------|----e----|-----b-----|--------------|
+     * </pre>
+     * 
+     * where the regions of length <code>a</code> and <code>b=size-(a+d)</code> have been preserved
+     * and the gap between them adjusted to specification. The new offset f' is chosen heuristically
+     * by the method to optimise the efficiency of repeated adjustment near either end of the array,
+     * e.g. repeated prepend or append operations. The effect on this PyByteArray is that:
+     * 
+     * <pre>
+     * this.offset = f'
+     * this.size = s' = a+e+b
+     * </pre>
+     * 
+     * Arguments are not checked for validity <b>at all</b>.
+     * a, e and b are non-negative and not all zero.
+     * 
+     * @param f location (with offset) of A
+     * @param a length of A
+     * @param g = f+a+d location (with offset) of B
+     * @param b length of B
+     * @param e gap between A and B in new storage.
+     */
+    private void newStorage(int f, int a, int g, int b, int e) {
+        // Enough room for the data and the gap
+        int s2 = a + e + b;
+        // Preserve a reference to the current data in the storage being discarded
+        byte[] source = this.storage;
+        // New storage with a bit of elbow-room
+        byte[] newStorage = new byte[roundUp(s2)];
+        // Choose the new offset f' to make prepend or append operations quicker.
+        // E.g. if insertion was near the end (b small) put most of the new space at the end.
+        int f2;
+        if (a == b) {
+            // Mainly to trap the case a=b=0
+            f2 = (newStorage.length - s2) / 2;
+        } else {
+            // a and b are not both zero (since not equal)
+            long spare = newStorage.length - s2;
+            f2 = (int)((spare * b) / (a + b));
+        }
+        setStorage(newStorage, s2, f2);
+
+        // Copy across the data
+        if (a > 0) System.arraycopy(source, f, storage, offset, a);
+        if (b > 0) System.arraycopy(source, g, storage, offset + (a + e), b);
+    }
+    
+
+    /**
+     * Delete <code>d</code> elements at index <code>a</code> by moving together the surrounding
+     * elements. The method manipulates the <code>storage</code> array, <code>size</code> and
+     * <code>offset</code>, and will allocate a new storage array if necessary, or if the deletion
+     * is big enough. If the initial storage looks like this:
+     * 
+     * <pre>
+     * |-                           L                              -|
+     *       |-                  s                -|
+     * |--f--|--------a--------|---d---|-----b-----|----------------|
+     * </pre>
+     * 
+     * then after the call the (possibly new) storage looks like this:
+     * 
+     * <pre>
+     * |-                 L'                     -|
+     *      |-                  s'               -|
+     * |-f'-|--------a--------|-----b-----|-------|
+     * </pre>
+     * 
+     * where the regions of length <code>a</code> and <code>b=size-(a+d)</code> have been preserved
+     * and the gap between them eliminated. The effect on this PyByteArray is that:
+     * 
+     * <pre>
+     * this.offset = f'
+     * this.size = s' = a+b
+     * </pre>
+     * The method does not implement the Python repertoire of slice indices but avoids indexing
+     * outside the bytearray by silently adjusting a to be within it.
+     * Negative d is treated as 0 and if d is too large, it is truncated to the array end.
+     * 
+     * @param a index of hole in byte array
+     * @param d number to discard (will discard x[a,a+d-1])
+     * @param e size of hole to open (will be x[a, a+e-1])
+     */
+    private void storageDelete(int a, int d) {
+        // storageReplace specialised for delete (e=0)
+        int s = this.size;
+
+        // Some of these should perhaps be errors but let's silently correct insane requests
+        if (a < 0) a = 0; else if (a > s) a = s;
+        if (d < 0) d = 0; else if (d > s - a) d = s - a;
+
+        // Handy derived values
+        int b = s - (a + d);    // which is >= 0
+        int s2 = s - d;         // which is >= 0
+        int f = this.offset;    // Location of x[0]
+        int g = f + (a + d);    // Location of x[-b]
+
+        if (shouldShrink(s2)) {
+            // We have far more storage than we need: shrink and copy both parts
+            // Preserve a reference to the current data in the storage being discarded
+            byte[] source = this.storage;
+            // New storage with a bit of elbow-room
+            newStorage(s2);
+            // Copy across the data
+            if (a > 0) System.arraycopy(source, f, storage, offset, a);
+            if (b > 0) System.arraycopy(source, g, storage, offset + a, b);
+
+        } else {
+            if (a < b) {
+                // It would be less copying if we moved A=x[:a] not B=x[-b:].
+                // If B is to stay where it is, it means A will land here:
+                int f2 = f + d;
+                if (a > 0) {
+                    System.arraycopy(storage, f, storage, f2, a);
+                }
+                this.offset = f2;
+
+            } else /* a >= b */{
+                // It would be less copying if we moved B=x[-b:] not A=x[:a]
+                // If A is to stay where it is, it means B will land here:
+                int g2 = f + a;
+                if (b > 0) {
+                    System.arraycopy(storage, g, storage, g2, b);
+                }
+            }
+        }
+    }
+
+    /**
+     * Delete <code>d</code> elements on a stride of <code>c</code> beginning at index
+     * <code>a</code> by moving together the surrounding elements. The method manipulates the
+     * <code>storage</code> array, <code>size</code> and <code>offset</code>, and will allocate a
+     * new storage array if the deletion is big enough. If the initial storage looks like this:
+     * 
+     * <pre>
+     * |-                               L                                -|
+     *       |-                    s                    -|
+     * |--f--|-----a-----|---------e---------|-----b-----|----------------|
+     * </pre>
+     * 
+     * then after the call the (possibly new) storage looks like this:
+     * 
+     * <pre>
+     * |-                  L'                  -|
+     *      |-                s'               -|
+     * |-f'-|-----a-----|---(e-d)---|-----b-----|-------|
+     * </pre>
+     * 
+     * where the regions of length <code>a</code> and <code>b=size-(a+e)</code> have been preserved
+     * and the <code>e</code> intervening elements reduced to <code>e-d</code> elements, by removing
+     * exactly the elements with indices (relative to the start of valid data) <code>a+k*c</code>
+     * for <code>k=0...d-1</code>. The effect on this PyByteArray is that:
+     * 
+     * <pre>
+     * this.offset = f'
+     * this.size = s' = a+b
+     * </pre>
+     * 
+     * The method does not implement the Python repertoire of slice indices but avoids indexing
+     * outside the bytearray by silently adjusting a to be within it. Negative d is treated as 0 and
+     * if d is too large, it is truncated to the array end.
+     * 
+     * @param a index of hole in byte array
+     * @param c (>0) step size between the locations of elements to delete
+     * @param d number to discard (will discard x[a+k*c] for k=0...d-1)
+     */
+    private void storageDeleteEx(int a, int c, int d) {
+        
+        // XXX Base this on storageReplace with the same a<b logic but piecewise copy
+        // XXX Change SequenceIndexDelegate to use (and PyList to implement) delslice()
+    }
+}
+
+/*
+ *  >>> for method in dir(bytearray):
+        ...     print method
+        ...
+        __add__
+        __alloc__
+        __class__
+        __contains__
+        __delattr__
+        __delitem__
+        __doc__
+        __eq__
+        __format__
+        __ge__
+        __getattribute__
+        __getitem__
+        __gt__
+        __hash__
+        __iadd__
+        __imul__
+        __init__
+        __iter__
+        __le__
+        __len__
+        __lt__
+        __mul__
+        __ne__
+        __new__
+        __reduce__
+        __reduce_ex__
+        __repr__
+        __rmul__
+        __setattr__
+        __setitem__
+        __sizeof__
+        __str__
+        __subclasshook__
+        append
+        capitalize
+        center
+        count
+        decode
+        endswith
+        expandtabs
+        extend
+        find
+        fromhex
+        index
+        insert
+        isalnum
+        isalpha
+        isdigit
+        islower
+        isspace
+        istitle
+        isupper
+        join
+        ljust
+        lower
+        lstrip
+        partition
+        pop
+        remove
+        replace
+        reverse
+        rfind
+        rindex
+        rjust
+        rpartition
+        rsplit
+        rstrip
+        split
+        splitlines
+        startswith
+        strip
+        swapcase
+        title
+        translate
+        upper
+        zfill
+        >>>
+ */
diff --git a/src/org/python/core/PyByteArrayDerived.java b/src/org/python/core/PyByteArrayDerived.java
new file mode 100644
--- /dev/null
+++ b/src/org/python/core/PyByteArrayDerived.java
@@ -0,0 +1,1116 @@
+/* Generated file, do not modify.  See jython/src/templates/gderived.py. */
+package org.python.core;
+
+import java.io.Serializable;
+
+public class PyByteArrayDerived extends PyByteArray implements Slotted {
+
+    public PyObject getSlot(int index) {
+        return slots[index];
+    }
+
+    public void setSlot(int index,PyObject value) {
+        slots[index]=value;
+    }
+
+    private PyObject[]slots;
+
+    private PyObject dict;
+
+    public PyObject fastGetDict() {
+        return dict;
+    }
+
+    public PyObject getDict() {
+        return dict;
+    }
+
+    public void setDict(PyObject newDict) {
+        if (newDict instanceof PyStringMap||newDict instanceof PyDictionary) {
+            dict=newDict;
+        } else {
+            throw Py.TypeError("__dict__ must be set to a Dictionary "+newDict.getClass().getName());
+        }
+    }
+
+    public void delDict() {
+        // deleting an object's instance dict makes it grow a new one
+        dict=new PyStringMap();
+    }
+
+    public PyByteArrayDerived(PyType subtype) {
+        super(subtype);
+        slots=new PyObject[subtype.getNumSlots()];
+        dict=subtype.instDict();
+    }
+
+    public PyString __str__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__str__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyString)
+                return(PyString)res;
+            throw Py.TypeError("__str__"+" returned non-"+"string"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__str__();
+    }
+
+    public PyString __repr__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__repr__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyString)
+                return(PyString)res;
+            throw Py.TypeError("__repr__"+" returned non-"+"string"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__repr__();
+    }
+
+    public PyString __hex__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__hex__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyString)
+                return(PyString)res;
+            throw Py.TypeError("__hex__"+" returned non-"+"string"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__hex__();
+    }
+
+    public PyString __oct__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__oct__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyString)
+                return(PyString)res;
+            throw Py.TypeError("__oct__"+" returned non-"+"string"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__oct__();
+    }
+
+    public PyFloat __float__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__float__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyFloat)
+                return(PyFloat)res;
+            throw Py.TypeError("__float__"+" returned non-"+"float"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__float__();
+    }
+
+    public PyComplex __complex__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__complex__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyComplex)
+                return(PyComplex)res;
+            throw Py.TypeError("__complex__"+" returned non-"+"complex"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__complex__();
+    }
+
+    public PyObject __pos__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__pos__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        return super.__pos__();
+    }
+
+    public PyObject __neg__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__neg__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        return super.__neg__();
+    }
+
+    public PyObject __abs__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__abs__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        return super.__abs__();
+    }
+
+    public PyObject __invert__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__invert__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        return super.__invert__();
+    }
+
+    public PyObject __reduce__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__reduce__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        return super.__reduce__();
+    }
+
+    public PyObject __add__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__add__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__add__(other);
+    }
+
+    public PyObject __radd__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__radd__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__radd__(other);
+    }
+
+    public PyObject __sub__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__sub__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__sub__(other);
+    }
+
+    public PyObject __rsub__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rsub__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rsub__(other);
+    }
+
+    public PyObject __mul__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__mul__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__mul__(other);
+    }
+
+    public PyObject __rmul__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rmul__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rmul__(other);
+    }
+
+    public PyObject __div__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__div__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__div__(other);
+    }
+
+    public PyObject __rdiv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rdiv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rdiv__(other);
+    }
+
+    public PyObject __floordiv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__floordiv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__floordiv__(other);
+    }
+
+    public PyObject __rfloordiv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rfloordiv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rfloordiv__(other);
+    }
+
+    public PyObject __truediv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__truediv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__truediv__(other);
+    }
+
+    public PyObject __rtruediv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rtruediv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rtruediv__(other);
+    }
+
+    public PyObject __mod__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__mod__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__mod__(other);
+    }
+
+    public PyObject __rmod__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rmod__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rmod__(other);
+    }
+
+    public PyObject __divmod__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__divmod__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__divmod__(other);
+    }
+
+    public PyObject __rdivmod__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rdivmod__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rdivmod__(other);
+    }
+
+    public PyObject __rpow__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rpow__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rpow__(other);
+    }
+
+    public PyObject __lshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__lshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__lshift__(other);
+    }
+
+    public PyObject __rlshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rlshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rlshift__(other);
+    }
+
+    public PyObject __rshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rshift__(other);
+    }
+
+    public PyObject __rrshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rrshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rrshift__(other);
+    }
+
+    public PyObject __and__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__and__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__and__(other);
+    }
+
+    public PyObject __rand__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rand__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rand__(other);
+    }
+
+    public PyObject __or__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__or__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__or__(other);
+    }
+
+    public PyObject __ror__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ror__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ror__(other);
+    }
+
+    public PyObject __xor__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__xor__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__xor__(other);
+    }
+
+    public PyObject __rxor__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__rxor__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__rxor__(other);
+    }
+
+    public PyObject __lt__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__lt__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__lt__(other);
+    }
+
+    public PyObject __le__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__le__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__le__(other);
+    }
+
+    public PyObject __gt__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__gt__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__gt__(other);
+    }
+
+    public PyObject __ge__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ge__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ge__(other);
+    }
+
+    public PyObject __eq__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__eq__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__eq__(other);
+    }
+
+    public PyObject __ne__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ne__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ne__(other);
+    }
+
+    public PyObject __iadd__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__iadd__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__iadd__(other);
+    }
+
+    public PyObject __isub__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__isub__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__isub__(other);
+    }
+
+    public PyObject __imul__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__imul__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__imul__(other);
+    }
+
+    public PyObject __idiv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__idiv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__idiv__(other);
+    }
+
+    public PyObject __ifloordiv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ifloordiv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ifloordiv__(other);
+    }
+
+    public PyObject __itruediv__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__itruediv__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__itruediv__(other);
+    }
+
+    public PyObject __imod__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__imod__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__imod__(other);
+    }
+
+    public PyObject __ipow__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ipow__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ipow__(other);
+    }
+
+    public PyObject __ilshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ilshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ilshift__(other);
+    }
+
+    public PyObject __irshift__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__irshift__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__irshift__(other);
+    }
+
+    public PyObject __iand__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__iand__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__iand__(other);
+    }
+
+    public PyObject __ior__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ior__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ior__(other);
+    }
+
+    public PyObject __ixor__(PyObject other) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__ixor__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(other);
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__ixor__(other);
+    }
+
+    public PyObject __int__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__int__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyInteger||res instanceof PyLong)
+                return res;
+            throw Py.TypeError("__int__"+" should return an integer");
+        }
+        return super.__int__();
+    }
+
+    public PyObject __long__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__long__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyLong||res instanceof PyInteger)
+                return res;
+            throw Py.TypeError("__long__"+" returned non-"+"long"+" (type "+res.getType().fastGetName()+")");
+        }
+        return super.__long__();
+    }
+
+    public int hashCode() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__hash__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyInteger) {
+                return((PyInteger)res).getValue();
+            } else
+                if (res instanceof PyLong) {
+                    return((PyLong)res).getValue().intValue();
+                }
+            throw Py.TypeError("__hash__ should return a int");
+        }
+        if (self_type.lookup("__eq__")!=null||self_type.lookup("__cmp__")!=null) {
+            throw Py.TypeError(String.format("unhashable type: '%.200s'",getType().fastGetName()));
+        }
+        return super.hashCode();
+    }
+
+    public PyUnicode __unicode__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__unicode__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyUnicode)
+                return(PyUnicode)res;
+            if (res instanceof PyString)
+                return new PyUnicode((PyString)res);
+            throw Py.TypeError("__unicode__"+" should return a "+"unicode");
+        }
+        return super.__unicode__();
+    }
+
+    public int __cmp__(PyObject other) {
+        PyType self_type=getType();
+        PyObject[]where_type=new PyObject[1];
+        PyObject impl=self_type.lookup_where("__cmp__",where_type);
+        // Full Compatibility with CPython __cmp__:
+        // If the derived type don't override __cmp__, the
+        // *internal* super().__cmp__ should be called, not the
+        // exposed one. The difference is that the exposed __cmp__
+        // throws a TypeError if the argument is an instance of the same type.
+        if (impl==null||where_type[0]==TYPE||Py.isSubClass(TYPE,where_type[0])) {
+            return super.__cmp__(other);
+        }
+        PyObject res=impl.__get__(this,self_type).__call__(other);
+        if (res==Py.NotImplemented) {
+            return-2;
+        }
+        int c=res.asInt();
+        return c<0?-1:c>0?1:0;
+    }
+
+    public boolean __nonzero__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__nonzero__");
+        if (impl==null) {
+            impl=self_type.lookup("__len__");
+            if (impl==null)
+                return super.__nonzero__();
+        }
+        PyObject o=impl.__get__(this,self_type).__call__();
+        Class c=o.getClass();
+        if (c!=PyInteger.class&&c!=PyBoolean.class) {
+            throw Py.TypeError(String.format("__nonzero__ should return bool or int, returned %s",self_type.getName()));
+        }
+        return o.__nonzero__();
+    }
+
+    public boolean __contains__(PyObject o) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__contains__");
+        if (impl==null)
+            return super.__contains__(o);
+        return impl.__get__(this,self_type).__call__(o).__nonzero__();
+    }
+
+    public int __len__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__len__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyInteger)
+                return((PyInteger)res).getValue();
+            throw Py.TypeError("__len__ should return a int");
+        }
+        return super.__len__();
+    }
+
+    public PyObject __iter__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__iter__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__();
+        impl=self_type.lookup("__getitem__");
+        if (impl==null)
+            return super.__iter__();
+        return new PySequenceIter(this);
+    }
+
+    public PyObject __iternext__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("next");
+        if (impl!=null) {
+            try {
+                return impl.__get__(this,self_type).__call__();
+            } catch (PyException exc) {
+                if (exc.match(Py.StopIteration))
+                    return null;
+                throw exc;
+            }
+        }
+        return super.__iternext__(); // ???
+    }
+
+    public PyObject __finditem__(PyObject key) { // ???
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__getitem__");
+        if (impl!=null)
+            try {
+                return impl.__get__(this,self_type).__call__(key);
+            } catch (PyException exc) {
+                if (exc.match(Py.LookupError))
+                    return null;
+                throw exc;
+            }
+        return super.__finditem__(key);
+    }
+
+    public PyObject __finditem__(int key) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__getitem__");
+        if (impl!=null)
+            try {
+                return impl.__get__(this,self_type).__call__(new PyInteger(key));
+            } catch (PyException exc) {
+                if (exc.match(Py.LookupError))
+                    return null;
+                throw exc;
+            }
+        return super.__finditem__(key);
+    }
+
+    public PyObject __getitem__(PyObject key) {
+        // Same as __finditem__, without swallowing LookupErrors. This allows
+        // __getitem__ implementations written in Python to raise custom
+        // exceptions (such as subclasses of KeyError).
+        //
+        // We are forced to duplicate the code, instead of defining __finditem__
+        // in terms of __getitem__. That's because PyObject defines __getitem__
+        // in terms of __finditem__. Therefore, we would end with an infinite
+        // loop when self_type.lookup("__getitem__") returns null:
+        //
+        //  __getitem__ -> super.__getitem__ -> __finditem__ -> __getitem__
+        //
+        // By duplicating the (short) lookup and call code, we are safe, because
+        // the call chains will be:
+        //
+        // __finditem__ -> super.__finditem__
+        //
+        // __getitem__ -> super.__getitem__ -> __finditem__ -> super.__finditem__
+
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__getitem__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__(key);
+        return super.__getitem__(key);
+    }
+
+    public void __setitem__(PyObject key,PyObject value) { // ???
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__setitem__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(key,value);
+            return;
+        }
+        super.__setitem__(key,value);
+    }
+
+    public PyObject __getslice__(PyObject start,PyObject stop,PyObject step) { // ???
+        if (step!=null) {
+            return __getitem__(new PySlice(start,stop,step));
+        }
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__getslice__");
+        if (impl!=null) {
+            PyObject[]indices=PySlice.indices2(this,start,stop);
+            return impl.__get__(this,self_type).__call__(indices[0],indices[1]);
+        }
+        return super.__getslice__(start,stop,step);
+    }
+
+    public void __setslice__(PyObject start,PyObject stop,PyObject step,PyObject value) {
+        if (step!=null) {
+            __setitem__(new PySlice(start,stop,step),value);
+            return;
+        }
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__setslice__");
+        if (impl!=null) {
+            PyObject[]indices=PySlice.indices2(this,start,stop);
+            impl.__get__(this,self_type).__call__(indices[0],indices[1],value);
+            return;
+        }
+        super.__setslice__(start,stop,step,value);
+    }
+
+    public void __delslice__(PyObject start,PyObject stop,PyObject step) {
+        if (step!=null) {
+            __delitem__(new PySlice(start,stop,step));
+            return;
+        }
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__delslice__");
+        if (impl!=null) {
+            PyObject[]indices=PySlice.indices2(this,start,stop);
+            impl.__get__(this,self_type).__call__(indices[0],indices[1]);
+            return;
+        }
+        super.__delslice__(start,stop,step);
+    }
+
+    public void __delitem__(PyObject key) { // ???
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__delitem__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(key);
+            return;
+        }
+        super.__delitem__(key);
+    }
+
+    public PyObject __call__(PyObject args[],String keywords[]) {
+        ThreadState ts=Py.getThreadState();
+        if (ts.recursion_depth++>ts.systemState.getrecursionlimit())
+            throw Py.RuntimeError("maximum __call__ recursion depth exceeded");
+        try {
+            PyType self_type=getType();
+            PyObject impl=self_type.lookup("__call__");
+            if (impl!=null)
+                return impl.__get__(this,self_type).__call__(args,keywords);
+            return super.__call__(args,keywords);
+        } finally {
+            --ts.recursion_depth;
+        }
+    }
+
+    public PyObject __findattr_ex__(String name) {
+        return Deriveds.__findattr_ex__(this,name);
+    }
+
+    public void __setattr__(String name,PyObject value) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__setattr__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(PyString.fromInterned(name),value);
+            return;
+        }
+        super.__setattr__(name,value);
+    }
+
+    public void __delattr__(String name) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__delattr__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(PyString.fromInterned(name));
+            return;
+        }
+        super.__delattr__(name);
+    }
+
+    public PyObject __get__(PyObject obj,PyObject type) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__get__");
+        if (impl!=null) {
+            if (obj==null)
+                obj=Py.None;
+            if (type==null)
+                type=Py.None;
+            return impl.__get__(this,self_type).__call__(obj,type);
+        }
+        return super.__get__(obj,type);
+    }
+
+    public void __set__(PyObject obj,PyObject value) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__set__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(obj,value);
+            return;
+        }
+        super.__set__(obj,value);
+    }
+
+    public void __delete__(PyObject obj) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__delete__");
+        if (impl!=null) {
+            impl.__get__(this,self_type).__call__(obj);
+            return;
+        }
+        super.__delete__(obj);
+    }
+
+    public PyObject __pow__(PyObject other,PyObject modulo) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__pow__");
+        if (impl!=null) {
+            PyObject res;
+            if (modulo==null) {
+                res=impl.__get__(this,self_type).__call__(other);
+            } else {
+                res=impl.__get__(this,self_type).__call__(other,modulo);
+            }
+            if (res==Py.NotImplemented)
+                return null;
+            return res;
+        }
+        return super.__pow__(other,modulo);
+    }
+
+    public void dispatch__init__(PyObject[]args,String[]keywords) {
+        Deriveds.dispatch__init__(this,args,keywords);
+    }
+
+    public PyObject __index__() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__index__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (res instanceof PyInteger||res instanceof PyLong) {
+                return res;
+            }
+            throw Py.TypeError(String.format("__index__ returned non-(int,long) (type %s)",res.getType().fastGetName()));
+        }
+        return super.__index__();
+    }
+
+    public Object __tojava__(Class c) {
+        // If we are not being asked by the "default" conversion to java, then
+        // we can provide this as the result, as long as it is a instance of the
+        // specified class. Without this, derived.__tojava__(PyObject.class)
+        // would broke. (And that's not pure speculation: PyReflectedFunction's
+        // ReflectedArgs asks for things like that).
+        if ((c!=Object.class)&&(c!=Serializable.class)&&(c.isInstance(this))) {
+            return this;
+        }
+        // Otherwise, we call the derived __tojava__, if it exists:
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__tojava__");
+        if (impl!=null)
+            return impl.__get__(this,self_type).__call__(Py.java2py(c)).__tojava__(Object.class);
+        return super.__tojava__(c);
+    }
+
+    public Object __coerce_ex__(PyObject o) {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__coerce__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__(o);
+            if (res==Py.NotImplemented)
+                return Py.None;
+            if (!(res instanceof PyTuple))
+                throw Py.TypeError("__coerce__ didn't return a 2-tuple");
+            return((PyTuple)res).getArray();
+        }
+        return super.__coerce_ex__(o);
+    }
+
+    public String toString() {
+        PyType self_type=getType();
+        PyObject impl=self_type.lookup("__repr__");
+        if (impl!=null) {
+            PyObject res=impl.__get__(this,self_type).__call__();
+            if (!(res instanceof PyString))
+                throw Py.TypeError("__repr__ returned non-string (type "+res.getType().fastGetName()+")");
+            return((PyString)res).toString();
+        }
+        return super.toString();
+    }
+
+}
diff --git a/src/org/python/core/__builtin__.java b/src/org/python/core/__builtin__.java
--- a/src/org/python/core/__builtin__.java
+++ b/src/org/python/core/__builtin__.java
@@ -296,6 +296,7 @@
         dict.__setitem__("True", Py.True);
         dict.__setitem__("False", Py.False);
         dict.__setitem__("bytes", PyString.TYPE);
+        dict.__setitem__("bytearray", PyByteArray.TYPE);
         dict.__setitem__("memoryview", PyMemoryView.TYPE);
 
         // Work in debug mode by default
diff --git a/src/templates/bytearray.derived b/src/templates/bytearray.derived
new file mode 100644
--- /dev/null
+++ b/src/templates/bytearray.derived
@@ -0,0 +1,4 @@
+base_class: PyByteArray
+want_dict: true
+ctr:
+incl: object
diff --git a/src/templates/mappings b/src/templates/mappings
--- a/src/templates/mappings
+++ b/src/templates/mappings
@@ -10,6 +10,7 @@
 ClasspathPyImporter.derived:org.python.core.ClasspathPyImporterDerived
 PyFileIO.derived:org.python.modules._fileio.PyFileIODerived
 array.derived:org.python.core.PyArrayDerived
+bytearray.derived:org.python.core.PyByteArrayDerived
 classmethod.derived:org.python.core.PyClassMethodDerived
 complex.derived:org.python.core.PyComplexDerived
 defaultdict.derived:org.python.modules._collections.PyDefaultDictDerived
diff --git a/tests/java/org/python/core/BaseBytesTest.java b/tests/java/org/python/core/BaseBytesTest.java
new file mode 100644
--- /dev/null
+++ b/tests/java/org/python/core/BaseBytesTest.java
@@ -0,0 +1,927 @@
+package org.python.core;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import org.python.util.PythonInterpreter;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test of org.python.core.BaseBytes, a class that supplies much of the behaviour of the Jython
+ * bytearray. In fact, it supplies almost all the immutable behaviour, and is abstract. In order to
+ * test it, we need to define a concrete extension nested class MyBytes that is, almost, the Jython
+ * 3.x bytes type.
+ * <p>
+ * Tests here are aimed at:
+ * <ul>
+ * <li>construction of a correct internal buffer through the init methods</li>.
+ * <li>access methods for immutable types (such as {@link BaseBytes#getslice(int, int, int)}</li>.
+ * <li>access methods for mutable types throw exceptions</li>.
+ * <li>the java.util.List<PyInteger> interface</li>.
+ * </ul>
+ * From this list the test currently lacks testing deletion, testing the List API and memoryview.
+ * <p>
+ * The bulk of the functionality is tested in the Python regression tests (from CPythonLib. This
+ * test class can be extended to test subclasses of BaseBytes, and all the tests defined here will
+ * run for the subclass.
+ */
+public class BaseBytesTest extends TestCase {
+
+    // Constants for array sizes
+    public static final int SMALL = 7; // Less than minimum storage size
+    public static final int MEDIUM = 25; // Medium array size
+    public static final int LARGE = 10000; // Large enough for performance measurement
+    public static final int HUGE = 100000; // Serious performance challenge
+
+    /**
+     * @param name
+     */
+    public BaseBytesTest(String name) {
+        super(name);
+    }
+
+    static PythonInterpreter interp = null;
+
+    Random random;
+
+    public static char toChar(int b) {
+        return Character.toChars(0xff & b)[0];
+    }
+
+    /**
+     * Turn a String into ints, but in the Python byte range, reducing character codes mod 256.
+     * 
+     * @param s the string
+     * @return
+     */
+    public static int[] toInts(String s) {
+        int n = s.length();
+        int[] r = new int[n];
+        for (int i = 0; i < n; i++) {
+            int c = s.codePointAt(i);
+            r[i] = 0xff & c;
+        }
+        return r;
+    }
+
+    /**
+     * Generate ints at random in the range 0..255.
+     * 
+     * @param random the random generator
+     * @param n length of array
+     * @return the array of random values
+     */
+    public static int[] randomInts(Random random, int n) {
+        int[] r = new int[n];
+        for (int i = 0; i < n; i++) {
+            r[i] = random.nextInt(256);
+        }
+        return r;
+    }
+
+    /**
+     * Generate ints at random in a restricted range.
+     * 
+     * @param random the random generator
+     * @param n length of array
+     * @param lo lowest value to generate
+     * @param hi highest value to generate
+     * @return the array of random values
+     */
+    public static int[] randomInts(Random random, int n, int lo, int hi) {
+        int[] r = new int[n];
+        int m = hi + 1 - lo;
+        for (int i = 0; i < n; i++) {
+            r[i] = lo + random.nextInt(m);
+        }
+        return r;
+    }
+
+    /**
+     * Compare expected and result array sections at specified locations and length.
+     * 
+     * @param expected reference values
+     * @param first first value to compare in expected values
+     * @param result bytearray from method under test
+     * @param start first value to compare in result values
+     * @param len number of values to compare
+     */
+    static void checkInts(int[] expected, int first, BaseBytes result, int start, int len) {
+        int end = first + len;
+        if (end > expected.length) end = expected.length;
+        for (int i = first, j = start; i < end; i++, j++)
+            assertEquals("element value", expected[i], result.intAt(j));
+    }
+
+    /**
+     * Compare expected and result array in their entirety.
+     * 
+     * @param expected
+     * @param result
+     */
+    static void checkInts(int[] expected, BaseBytes result) {
+        // Size must be the same
+        assertEquals("size", expected.length, result.size());
+        // And each element
+        for (int i = 0; i < expected.length; i++)
+            assertEquals("element value", expected[i], result.intAt(i));
+    }
+
+    /**
+     * Compare expected List<PyInteger> and result array in their entirety.
+     * 
+     * @param expected
+     * @param result
+     */
+    static void checkInts(List<PyInteger> expected, BaseBytes result) {
+        // Size must be the same
+        assertEquals("size", expected.size(), result.size());
+        // And each element
+        for (int i = 0; i < result.size; i++) {
+            PyInteger res = result.pyget(i);
+            PyInteger exp = expected.get(i);
+            // System.out.printf("    expected[%2d]=%3d  b[%2d]=%3d\n",
+            // i, exp.asInt(), i, res.asInt());
+            assertEquals("element value", exp, res);
+        }
+    }
+
+    /**
+     * Compare expected List<PyInteger> and result object in their entirety.
+     * 
+     * @param expected
+     * @param result
+     */
+    static void checkInts(List<PyInteger> expected, PyObject result) {
+        checkInts(expected, (BaseBytes)result);
+    }
+
+    /**
+     * Turn array into Iterable<PyObject>, treating as unsigned (Python-style) bytes, and producing
+     * an abusive mixture of object types.
+     * 
+     * @return iterable list
+     */
+    public static Iterable<PyObject> iterableBytes(int[] source) {
+        List<PyObject> list = new ArrayList<PyObject>(source.length);
+        int choose = 0;
+        for (int b : source) {
+            switch(choose++){
+                case 0:
+                    PyInteger i = new PyInteger(b);
+                    list.add(i);
+                    break;
+
+                case 1:
+                    PyLong l = new PyLong(b);
+                    list.add(l);
+                    break;
+
+                default:
+                    PyString s = new PyString(toChar(b));
+                    list.add(s);
+                    choose = 0;
+                    break;
+            }
+        }
+        return list;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+        random = new Random(20120310L);
+    }
+
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#init(int)} via MyBytes constructor, and for
+     * {@link org.python.core.BaseBytes#size()}.
+     */
+    public void testSize() {
+        // Local constructor from byte[]
+        int[] aRef = toInts("Chaque coquillage incrusté");
+        BaseBytes a = getInstance(aRef);
+        System.out.println(toString(a));
+        assertEquals(aRef.length, a.size());
+        // init(int) at various sizes
+        for (int n : new int[] {0, 1, 2, 7, 8, 9, MEDIUM, LARGE, HUGE}) {
+            a = getInstance(n);
+            // System.out.println(toString(a));
+            assertEquals("size()", n, a.size());
+            assertEquals("__len__()", n, a.__len__());
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#init(BaseBytes)} via constructor on MyBytes.
+     */
+    public void testInit_intArray() {
+        int[] aRef = toInts("Dans la grotte où nous nous aimâmes");
+        BaseBytes a = getInstance(aRef);
+        // Copy constructor b = bytes(a)
+        BaseBytes b = getInstance(a);
+        System.out.println(toString(b));
+        assertEquals(a.size(), b.size());
+        // assertEquals(a.storage, b.storage); // Supposed to share?
+        // Check we got the same bytes
+        for (int i = 0; i < a.size(); i++)
+            assertEquals(a.intAt(i), b.intAt(i));
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#init(BaseBytes)} via constructor on MyBytes.
+     */
+    public void testInit_Iterable() {
+        int[] aRef = toInts("A sa particularité.");
+        // Make an Iterable<? extends PyObject> of that
+        Iterable<? extends PyObject> ia = iterableBytes(aRef);
+        BaseBytes a = getInstance(ia);
+        System.out.println(toString(a));
+        assertEquals(aRef.length, a.size());
+        checkInts(aRef, a);
+
+        // Special cases: zero length
+        BaseBytes b = getInstance(iterableBytes(new int[0]));
+        // System.out.println(toString(b));
+        assertEquals(0, b.size());
+
+        // Special cases: very short (innards of init() take a short cut in this case)
+        int[] cRef = toInts(":-)");
+        BaseBytes c = getInstance(iterableBytes(cRef));
+        // System.out.println(toString(c));
+        assertEquals(cRef.length, c.size());
+        checkInts(cRef, c);
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#init(PyObject)} via constructor on MyBytes.
+     */
+    public void testInit_PyObject() {
+        // A scary set of objects
+        final PyObject[] brantub = {null,
+                                    new PyInteger(5),
+                                    new PyString("\u00A0\u00A1\u00A2\u00A3\u00A4"),
+                                    getInstance(new int[] {180, 190, 200}),
+                                    new PyXRange(1, 301, 50)};
+        // The array contents we should obtain
+        final int[][] prize = { {},
+                               {0, 0, 0, 0, 0},
+                               {160, 161, 162, 163, 164},
+                               {180, 190, 200},
+                               {1, 51, 101, 151, 201, 251}};
+        // Work down the lists
+        for (int dip = 0; dip < brantub.length; dip++) {
+            int[] aRef = prize[dip];
+            BaseBytes a = getInstance(brantub[dip]);
+            // System.out.println(toString(a));
+            assertEquals(aRef.length, a.size());
+            // Check we got the same bytes
+            checkInts(aRef, a);
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#init(PyObject)} via constructor on MyBytes,
+     * but where every example produced some kind of exception.
+     */
+    public void testInit_Exceptions() {
+        // Need interpreter for exceptions to be formed properly
+        interp = new PythonInterpreter();
+        // A scary set of objects
+        final PyObject[] brantub = {Py.None,
+                                    new PyInteger(-1),
+                                    new PyLong(0x80000000L),
+                                    new PyString("\u00A0\u0100\u00A2\u00A3\u00A4"),
+                                    new PyString("\u00A0\u00A0\u1000\u00A3\u00A4"),
+                                    new PyXRange(3, -2, -1),
+                                    new PyXRange(250, 257)};
+        // The PyException types we should obtain
+        final PyObject[] boobyPrize = {Py.TypeError, // None
+                                       Py.ValueError, // -1
+                                       Py.OverflowError, // 0x80000000L
+                                       Py.ValueError, // \u0100 byte
+                                       Py.ValueError, // \u1000 byte
+                                       Py.ValueError, // -1 in iterable
+                                       Py.ValueError // 256 in iterable
+        };
+        // Work down the lists
+        for (int dip = 0; dip < brantub.length; dip++) {
+            PyObject aRef = boobyPrize[dip];
+            try {
+                BaseBytes a = getInstance(brantub[dip]);
+                System.out.println(toString(a));
+                fail("Exception not thrown for " + brantub[dip]);
+            } catch (PyException pye) {
+                // System.out.println(pye);
+                PyObject a = pye.type;
+                assertEquals(aRef, a);
+            }
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#pyget(int)}.
+     */
+    public void testPyget() {
+        // Need interpreter
+        interp = new PythonInterpreter();
+        // Fill and access via pyget
+        int[] aRef = randomInts(random, MEDIUM);
+        BaseBytes a = getInstance(aRef);
+        for (int i = 0; i < MEDIUM; i++) {
+            PyInteger r = a.pyget(i);
+            // System.out.printf("    aRef[%2d]=%3d  r=%3d\n", i, aRef[i], r.asInt());
+            assertEquals(aRef[i], r.asInt());
+        }
+        // Check IndexError exceptions generated
+        for (int i : new int[] {-1, -100, MEDIUM, MEDIUM + 1}) {
+            try {
+                PyInteger r = a.pyget(i);
+                fail("Exception not thrown for pyget(" + i + ") =" + r);
+            } catch (PyException pye) {
+                assertEquals(Py.IndexError, pye.type);
+                // System.out.printf("    Exception: %s\n", pye);
+            }
+        }
+    }
+
+    /**
+     * Test method for {@link BaseBytes#getslice(int, int, int)}.
+     * 
+     * @see PySequence#__getslice__(PyObject, PyObject)
+     */
+    public void testGetslice() {
+        // getslice() deals with start, stop, step already 'interpreted' by SequenceIndexDelegate.
+        String ver = "L'un a la pourpre de nos âmes";
+        final int L = ver.length();
+        int[] aRef = toInts(ver);
+        BaseBytes a = getInstance(aRef);
+        List<PyInteger> bList = new ArrayList<PyInteger>(L);
+
+        final int[] posStart = new int[] {0, 1, 18, L - 8, L - 1};
+        final int[] negStart = new int[] {0, 3, 16, L - 10, L - 1};
+
+        // Positive step
+        for (int step = 1; step < 4; step++) {
+            for (int start : posStart) {
+                // Use step positively
+                for (int stop = start; stop <= L; stop++) {
+                    // Make a reference answer by picking elements of aRef in slice pattern
+                    bList.clear();
+                    for (int i = start; i < stop; i += step) {
+                        // System.out.printf("    (%d,%d,%d) i=%d\n", start, stop, step, i);
+                        bList.add(new PyInteger(aRef[i]));
+                    }
+                    // Generate test result
+                    // System.out.printf("    getslice(%d,%d,%d)\n", start, stop, step);
+                    BaseBytes b = a.getslice(start, stop, step);
+                    // System.out.println(toString(b));
+                    // Now check size and contents
+                    checkInts(bList, b);
+                }
+            }
+        }
+
+        // Negative step
+        for (int step = -1; step > -4; step--) {
+            for (int start : negStart) {
+                // Use step positively
+                for (int stop = -1; stop <= start; stop++) {
+                    // Make a reference answer by picking elements of aRef in slice pattern
+                    bList.clear();
+                    for (int i = start; i > stop; i += step) {
+                        // System.out.printf("    (%d,%d,%d) i=%d\n", start, stop, step, i);
+                        bList.add(new PyInteger(aRef[i]));
+                    }
+                    // Generate test result
+                    // System.out.printf("    getslice(%d,%d,%d)\n", start, stop, step);
+                    BaseBytes b = a.getslice(start, stop, step);
+                    // System.out.println(toString(b));
+                    // Now check size and contents
+                    checkInts(bList, b);
+                }
+            }
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#repeat(int)}.
+     */
+    public void testRepeatInt() {
+        String spam = "Spam, "; // Could it be anything else?
+        final int maxCount = 10;
+        final int L = spam.length();
+        int[] aRef = toInts(spam);
+        BaseBytes a = getInstance(aRef);
+
+        for (int count = 0; count <= maxCount; count++) {
+            // Reference answer
+            int[] bRef = new int[count * L];
+            for (int i = 0; i < count; i++)
+                for (int j = 0; j < L; j++)
+                    bRef[i * L + j] = aRef[j];
+            // Test
+            BaseBytes b = a.repeat(count);
+            // System.out.println(toString(b));
+            checkInts(bRef, b);
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#pyset(int,PyObject)}, that it throws an
+     * exception by default. Override in tests of mutable subclasses.
+     */
+    public void testPyset() {
+        PyObject bRef = Py.TypeError;
+        int[] aRef = toInts("This immutable type seems to allow modifications.");
+        BaseBytes a = getInstance(aRef);
+        int start = a.size() / 2;
+        PyInteger x = new PyInteger('x');
+
+        try {
+            a.pyset(start, x);
+            System.out.println(toString(a));
+            fail(String.format("Exception not thrown for pyset(%d,%s)", start, x));
+        } catch (PyException pye) {
+            // System.out.println(pye);
+            PyObject b = pye.type;
+            assertEquals(bRef, b);
+        }
+    }
+
+    /**
+     * Test method for {@link org.python.core.BaseBytes#setslice(int,int,int,PyObject)}, that it
+     * throws an exception by default. Override in tests of mutable subclasses.
+     */
+    public void testSetslice3() {
+        PyObject bRef = Py.TypeError;
+        int[] aRef = toInts("This immutable type seems to allow modifications.");
+        BaseBytes a = getInstance(aRef);
+        int start = a.size() / 4;
+        int stop = (3 * a.size() + 3) / 4;
+        int step = 3;
+        BaseBytes x = new MyBytes(randomInts(random, SMALL));
+
+        try {
+            a.setslice(start, stop, step, x);
+            System.out.println(toString(a));
+            fail(String.format("Exception not thrown for setslice(%d,%d,%d,%s)", start, stop, step,
+                               x));
+        } catch (PyException pye) {
+            // System.out.println(pye);
+            PyObject b = pye.type;
+            assertEquals(bRef, b);
+        }
+    }
+
+    /*
+     * Note that JUnit test classes extending this one inherit all the test* methods, and they will
+     * be run by JUnit. Each test uses getInstance() methods where it might have used a constructor
+     * with a similar signature. The idea is to override the getInstance() methods to return an
+     * instance of the class actually under test in the derived test.
+     */
+    public BaseBytes getInstance(PyType type) {
+        return new MyBytes(type);
+    }
+
+    public BaseBytes getInstance() {
+        return new MyBytes();
+    }
+
+    public BaseBytes getInstance(int size) {
+        return new MyBytes(size);
+    }
+
+    public BaseBytes getInstance(int[] value) {
+        return new MyBytes(value);
+    }
+
+    public BaseBytes getInstance(BaseBytes value) throws PyException {
+        return new MyBytes(value);
+    }
+
+    public BaseBytes getInstance(MemoryViewProtocol value) throws PyException {
+        return new MyBytes(value);
+    }
+
+    public BaseBytes getInstance(Iterable<? extends PyObject> value) throws PyException {
+        return new MyBytes(value);
+    }
+
+    public BaseBytes getInstance(PyString arg, PyObject encoding, PyObject errors)
+            throws PyException {
+        return new MyBytes(arg, encoding, errors);
+    }
+
+    public BaseBytes getInstance(PyString arg, String encoding, String errors) throws PyException {
+        return new MyBytes(arg, encoding, errors);
+    }
+
+    public BaseBytes getInstance(PyObject arg) throws PyException {
+        return new MyBytes(arg);
+    }
+
+// protected BaseBytes getInstance(int start, int stop, BaseBytes source) {
+// return new MyBytes(start, stop, source);
+// }
+
+    /**
+     * Extension of class under test that makes the internal variables visible and adds constructors
+     * like a derived class would.
+     */
+    public static class MyBytes extends BaseBytes {
+
+        public static final PyType TYPE = PyType.fromClass(MyBytes.class);
+
+        /**
+         * Create a zero-length Python byte array of explicitly-specified sub-type
+         * 
+         * @param type explicit Jython type
+         */
+        public MyBytes(PyType type) {
+            super(type);
+        }
+
+        /**
+         * Create a zero-length Python byte array of my type.
+         */
+        public MyBytes() {
+            super(TYPE);
+        }
+
+        /**
+         * Create zero-filled Python byte array of specified size.
+         * 
+         * @param size of byte array
+         */
+        public MyBytes(int size) {
+            super(TYPE, size);
+        }
+
+        /**
+         * Create from integer array
+         * 
+         * @param value
+         */
+        MyBytes(int[] value) {
+            super(TYPE, value);
+        }
+
+        /**
+         * Create a new array filled exactly by a copy of the contents of the source byte array.
+         * 
+         * @param value of the bytes
+         */
+        public MyBytes(BaseBytes value) {
+            super(TYPE);
+            init(value);
+        }
+
+        /**
+         * Create a new array filled exactly by a copy of the contents of the source.
+         * 
+         * @param value source of the bytes (and size)
+         */
+        public MyBytes(MemoryViewProtocol value) {
+            super(TYPE);
+            init(value.getMemoryView());
+        }
+
+        /**
+         * Create a new array filled from an iterable of PyObject. The iterable must yield objects
+         * convertible to Python bytes (non-negative integers less than 256 or strings of length 1).
+         * 
+         * @param value of the bytes
+         */
+        public MyBytes(Iterable<? extends PyObject> value) {
+            super(TYPE);
+            init(value);
+        }
+
+        /**
+         * Create a new array by encoding a PyString argument to bytes. If the PyString is actually
+         * a PyUnicode, the encoding must be explicitly specified.
+         * 
+         * @param arg primary argument from which value is taken
+         * @param encoding name of optional encoding (must be a string type)
+         * @param errors name of optional errors policy (must be a string type)
+         */
+        public MyBytes(PyString arg, PyObject encoding, PyObject errors) {
+            super(TYPE);
+            init(arg, encoding, errors);
+        }
+
+        /**
+         * Create a new array by encoding a PyString argument to bytes. If the PyString is actually
+         * a PyUnicode, the encoding must be explicitly specified.
+         * 
+         * @param arg primary argument from which value is taken
+         * @param encoding name of optional encoding (may be null to select the default for this
+         *            installation)
+         * @param errors name of optional errors policy
+         */
+        public MyBytes(PyString arg, String encoding, String errors) {
+            super(TYPE);
+            init(arg, encoding, errors);
+        }
+
+        /**
+         * Create a new MyBytes object from an arbitrary Python object according to the same rules
+         * as apply in Python to the bytes() constructor:
+         * <ul>
+         * <li>bytes() Construct a zero-length bytes (arg is null).</li>
+         * <li>bytes(int) Construct a zero-initialized bytes of the given length.</li>
+         * <li>bytes(iterable_of_ints) Construct from iterable yielding integers in [0..255]</li>
+         * <li>bytes(string [, encoding [, errors] ]) Construct from a text string, optionally using
+         * the specified encoding.</li>
+         * <li>bytes(unicode, encoding [, errors]) Construct from a unicode string using the
+         * specified encoding.</li>
+         * <li>bytes(bytes_or_bytearray) Construct as a mutable copy of existing bytes or bytearray
+         * object.</li>
+         * </ul>
+         * When it is necessary to specify an encoding, as in the Python signature
+         * <code>bytes(string, encoding[, errors])</code>, use the constructor
+         * {@link #MyBytes(PyString, String, String)}. If the PyString is actually a PyUnicode, an
+         * encoding must be specified, and using this constructor will throw an exception about
+         * that.
+         * 
+         * @param arg primary argument from which value is taken (may be null)
+         * @throws PyException in the same circumstances as bytes(arg), TypeError for non-iterable,
+         *             non-integer argument type, and ValueError if iterables do not yield byte
+         *             [0..255] values.
+         */
+        public MyBytes(PyObject arg) throws PyException {
+            super(TYPE);
+            init(arg);
+        }
+
+        /**
+         * Constructor for local use that avoids copying the source data, providing a range-view
+         * into it. The need for this arises (probably) during expressions that refer to a slice as
+         * just one term. It is safe because MyBytes is immutable. But it may not be wise if the
+         * source object is a large array from which only a small part needs to be retained in
+         * memory.
+         * 
+         * @param type explicit Jython type
+         * @param start index of first byte to use in source
+         * @param stop 1 + index of last byte to use in source
+         * @param source of the bytes
+         */
+        protected MyBytes(int start, int stop, BaseBytes source) {
+            super(TYPE);
+            setStorage(source.storage, stop - start, start);
+        }
+
+        /**
+         * Returns a PyByteArray that repeats this sequence the given number of times, as in the
+         * implementation of <tt>__mul__</tt> for strings.
+         * 
+         * @param count the number of times to repeat this.
+         * @return this byte array repeated count times.
+         */
+        @Override
+        protected MyBytes repeat(int count) {
+            MyBytes ret = new MyBytes();
+            ret.setStorage(repeatImpl(count));
+            return ret;
+        }
+
+        /**
+         * Returns a range of elements from the sequence.
+         * 
+         * @see org.python.core.PySequence#getslice(int, int, int)
+         */
+        @Override
+        protected MyBytes getslice(int start, int stop, int step) {
+            MyBytes r;
+            if (step == 1) {
+                // This is a contiguous slice [start:stop] so we can share storage
+                r = new MyBytes();
+                if (stop > start) r.setStorage(storage, stop - start, start + offset);
+            } else {
+                // This is an extended slice [start:stop:step] so we have to copy elements from it
+                r = new MyBytes(sliceLength(start, stop, step));
+                int iomax = r.size + r.offset;
+                for (int io = r.offset, jo = start; io < iomax; jo += step, io++)
+                    r.storage[io] = storage[jo]; // Assign r[i] = this[j]
+            }
+            return r;
+        }
+
+        /**
+         * Return number of elements
+         * 
+         * @see org.python.core.PyObject#__len__()
+         */
+        @Override
+        public int __len__() {
+            return size;
+        }
+
+    }
+
+    /**
+     * An object that for test purposes (of construction and slice assignment) contains an array of
+     * values that it is able to offer for reading through the MemoryView interface.
+     */
+    public static class MemoryViewable extends PyObject implements MemoryViewProtocol {
+
+        public static final PyType TYPE = PyType.fromClass(MemoryViewable.class);
+
+        private MemoryView mv;
+        private byte[] store;
+
+        /**
+         * Store integer array as bytes: range must be 0..255 inclusive.
+         * 
+         * @param value integers to store
+         */
+        MemoryViewable(int[] value) {
+            super(TYPE);
+            int n = value.length;
+            store = new byte[n];
+            for (int i = 0; i < n; i++)
+                store[i] = (byte)value[i];
+        }
+
+        @Override
+        public MemoryView getMemoryView() {
+            if (mv == null) mv = new MemoryViewImpl();
+            return mv;
+        }
+
+        /**
+         * All instances of MemoryViewable have one dimension with stride one.
+         */
+        private static final PyTuple STRIDES = new PyTuple(Py.One);
+
+        /**
+         * Very simple MemoryView for one-dimensional byte array.
+         */
+        class MemoryViewImpl implements MemoryView {
+
+            private final PyTuple shape = new PyTuple(new PyInteger(store.length));
+
+            @Override
+            public String get_format() {
+                return "B";
+            }
+
+            @Override
+            public int get_itemsize() {
+                return 1;
+            }
+
+            @Override
+            public PyTuple get_shape() {
+                return shape;
+            }
+
+            @Override
+            public int get_ndim() {
+                return 1;
+            }
+
+            @Override
+            public PyTuple get_strides() {
+                return STRIDES;
+            }
+
+            @Override
+            public boolean get_readonly() {
+                return true;
+            }
+
+        }
+    }
+
+    /**
+     * Stringify in a form helpful when testing buffer manipulation. Show picture if not too long.
+     */
+    protected String toString(BaseBytes b) {
+        Image i = new Image();
+        i.showSummary(b);
+        if (b.storage.length >= 0 && b.storage.length <= 70) {
+            i.padTo(15);
+            i.showContent(b);
+        }
+        return i.toString();
+    }
+
+    /**
+     * Apparatus for producing a nice representation when studying buffer management.
+     */
+    protected static class Image {
+
+        private StringBuilder image = new StringBuilder(100);
+
+        private void repeat(char c, int n) {
+            for (int i = 0; i < n; i++)
+                image.append(i == 0 ? '|' : ' ').append(c);
+        }
+
+        // Show in image s[pos:pos+n] (as 2*n characters)
+        private void append(byte[] s, int pos, int n) {
+            if (pos < 0 || pos + n > s.length) return;
+            for (int i = 0; i < n; i++) {
+                int c = 0xff & ((int)s[pos + i]);
+                if (c == 0)
+                    c = '.';
+                else if (Character.isISOControl(c)) c = '#';
+                image.append(i == 0 ? '|' : ' ').append(toChar(c));
+            }
+        }
+
+        // Show an extent of n bytes (as 2*n charactrs)
+        public void padTo(int n) {
+            while (n > image.length())
+                image.append(' ');
+        }
+
+        /**
+         * Write summary numbers offset [ size ] remainder
+         * 
+         * @param b
+         */
+        public String showSummary(BaseBytes b) {
+            image.append(b.offset);
+            image.append(" [ ").append(b.size).append(" ] ");
+            image.append(b.storage.length - (b.offset + b.size));
+            return image.toString();
+        }
+
+        /**
+         * Make text image of just the buffer boundaries.
+         * 
+         * @param b
+         */
+        public String showExtent(BaseBytes b) {
+            repeat('-', b.offset);
+            repeat('x', b.size);
+            int tail = b.storage.length - (b.offset + b.size);
+            repeat('-', tail);
+            image.append('|');
+            return image.toString();
+        }
+
+        /**
+         * Make text image of the buffer content and boundaries.
+         * 
+         * @param b
+         */
+        public String showContent(BaseBytes b) {
+            append(b.storage, 0, b.offset);
+            append(b.storage, b.offset, b.size);
+            int tail = b.storage.length - (b.offset + b.size);
+            append(b.storage, b.offset + b.size, tail);
+            image.append('|');
+            return image.toString();
+        }
+
+        @Override
+        public String toString() {
+            return image.toString();
+        }
+    }
+
+    /**
+     * Example code equivalent to the code illustrating <code>suboffsets</code> in the C API at <a
+     * href="http://docs.python.org/c-api/buffer.html#bufferobjects">The new-style Py_buffer
+     * struct</a>. <code>buf</code> is an n-dimensional array of Object, implementing the storage of
+     * some Python type, and it is required to access one element of it at an index defined by n
+     * integers in sequence.
+     * 
+     * @param n The number of dimensions the memory represents as a multi-dimensional array.
+     * @param buf An n-dimensional array containing the value of the object
+     * @param strides An array of length n giving the number of elements to skip to get to a new
+     *            element in each dimension
+     * @param suboffsets An array the length of n.
+     * @param indices An array of n indices indexing the element to retrieve.
+     * @return
+     */
+    private static Object getItem(int n, Object buf, int[] strides, int[] suboffsets, int[] indices) {
+        for (int i = 0; i < n; i++) {
+            Object[] p = (Object[])buf;
+            buf = p[indices[i] * strides[i] + suboffsets[i]];
+        }
+        return buf;
+    }
+
+    /*
+     * If it was an ndim-dimensional array of byte, we treat it as an (ndim-1)-dimensional array of
+     * byte[] arrays. This method exemplifies getting just one byte.
+     */
+    private static byte getByte(int ndim, Object buf, int[] strides, int[] suboffsets, int[] indices) {
+        int n = ndim - 1;
+        byte[] b = (byte[])getItem(n, buf, strides, suboffsets, indices);
+        return b[indices[n] + suboffsets[n]];
+    }
+
+}
diff --git a/tests/java/org/python/core/PyByteArrayTest.java b/tests/java/org/python/core/PyByteArrayTest.java
new file mode 100644
--- /dev/null
+++ b/tests/java/org/python/core/PyByteArrayTest.java
@@ -0,0 +1,1061 @@
+package org.python.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+import org.python.util.PythonInterpreter;
+
+
+/**
+ * JUnit tests for PyByteArray.
+ */
+public class PyByteArrayTest extends BaseBytesTest {
+
+    /**
+     * Constructor required by JUnit.
+     * @param name
+     */
+    public PyByteArrayTest(String name) {
+        super(name);
+    }
+
+    
+    /**
+     * Generate character codes for in a pattern matching an intended deletion or slice to be
+     * replaced. If c="adb", something like b'aaaaaaddddbbbb' where the 'd' characters should be
+     * deleted or replaced in the slice operation.
+     * 
+     * @param na number of c.charAt(0) characters
+     * @param nd number of c.charAt(1) characters
+     * @param nb number of c.charAt(2) characters
+     * @param c character codes
+     * @return filled array
+     */
+    public static int[] patternInts(int na, int nd, int nb, String c) {
+        int[] r = new int[na + nd + nb];
+        int p = 0;
+        for (int i = 0; i < na; i++)
+            r[p++] = c.charAt(0);
+        for (int i = 0; i < nd; i++)
+            r[p++] = c.charAt(1);
+        for (int i = 0; i < nb; i++)
+            r[p++] = c.charAt(2);
+        return r;
+    }
+
+    /**
+     * Generate character codes for 'a', 'D', 'b' in a pattern matching an intended deletion or
+     * slice to be replaced. Something like b'aaaaaaddddbbbb' where the 'E' characters should be
+     * deleted or replaced in the slice operation.
+     * 
+     * @param na number of a characters
+     * @param nd number of D characters
+     * @param nb number of b characters
+     * @return filled array
+     */
+    public static int[] adbInts(int na, int nd, int nb) {
+        return patternInts(na, nd, nb, "aDb");
+    }
+
+    /**
+     * Generate character codes for 'a', 'E', 'b' in a pattern matching an intended result of slice
+     * replacement. Something like b'aaaaaaEEEbbbb' where the 'E' characters are the replacement in
+     * the slice operation.
+     * 
+     * @param na number of a characters
+     * @param ne number of E characters
+     * @param nb number of b characters
+     * @return filled array
+     */
+    public static int[] aebInts(int na, int ne, int nb) {
+        return patternInts(na, ne, nb, "aEb");
+    }
+
+    /**
+     * Generate a tuple of int arrays at random in the range 0..255 for testing slice operations.
+     * In effect, the method generates 4 arrays of random data A, B, D, E and returns an array of three arrays formed thus:
+     * { A + D + B, A + E + B, E } where + means concatenation. This can be used to test slice
+     * assignment and deletion.
+     * 
+     * @param random the random generator
+     * @param na the number of elements in A
+     * @param nd the number of elements in D (the deleted material)
+     * @param nb the number of elements in B
+     * @param ne the number of elements in E (the inserted material, 0 for slice deletion)
+     * @return three arrays of length na + nd + nb, na + ne + nb, and ne.
+     */
+    public static int[][] randomSliceProblem(Random random, int na, int nd, int nb, int ne) {
+        int[] adb = new int[na + nd + nb];
+        int[] aeb = new int[na + ne + nb];
+        int[] e = new int[ne];
+        int[][] ret = { adb, aeb, e };
+        int p=0, q = 0;
+        // The A values go into adb and aeb
+        for (int i = 0; i < na; i++) {
+            int a = random.nextInt(256);
+            adb[p++] =a;
+            aeb[q++] =a;
+        }
+        // The D values go into adb only
+        for (int i = 0; i < nd; i++) {
+            int d = random.nextInt(256);
+            adb[p++] =d;
+        }
+        // The E values go into e and aeb
+        for (int i = 0; i < ne; i++) {
+            int x = random.nextInt(256);
+            e[p++] =x;
+            aeb[q++] =x;
+        }
+        // The B values go into adb and aeb
+        for (int i = 0; i < nb; i++) {
+            int b = random.nextInt(256);
+            adb[p++] =b;
+            aeb[q++] =b;
+        }
+        return ret;
+    }
+    
+
+    /**
+     * Check result of slice operations, synthesised from the elements passed. This method accepts
+     * the 'dimensions' of a slice problem and tests whether a resulting byte array contains the
+     * correct result. The data elements have come from two existing arrays of (potentially) random
+     * data X and Y. Let N=na+nd+nb. The client has generated, in effect, 4 arrays A=X[:na],
+     * B=X[-nb:N], D=X[na:nb] and E=Y[:ne], and posed the problem setslice( A + D + B, E ), where +
+     * means concatenation in this expression, to which the answer should be A + E + B. This method
+     * checks that the result is exactly that.
+     * 
+     * @param na the number of elements in A
+     * @param nd the number of elements in D (the deleted material)
+     * @param nb the number of elements in B
+     * @param ne the number of elements in E (the inserted material, 0 for slice deletion)
+     * @param x source of the A, D and B data
+     * @param y source of the E data
+     * @param result the result to be tested against A+E+B
+     */
+    public static void checkSlice(int na, int nd, int nb, int ne, int[] x, int[] y, BaseBytes result) {
+        // Check the size is right
+        assertEquals("size", na + ne + nb, result.size());
+        // Check that A is preserved
+        checkInts(x, 0, result, 0, na);
+        // Check that E is inserted
+        checkInts(y, 0, result, na, ne);
+        // Check that B is preserved
+        checkInts(x, na + nd, result, na + ne, nb);
+    }
+    
+    /**
+     * Check result of extended slice operations, synthesised from the elements passed. This method
+     * accepts the 'dimensions' of a slice problem and tests whether a resulting byte array contains
+     * the correct result. The result array has been filled from (the whole of) array x[], then
+     * slice assignment took place from y[k] to element u[start + k*step].
+     * 
+     * @param start
+     * @param step
+     * @param n number of steps
+     * @param x source of the original data
+     * @param y source of the assigned data
+     * @param u the result to be tested against properly selected elements of x and y
+     */
+    public static void checkSlice(int start, int step, int n, int[] x, int[] y, BaseBytes u) {
+        // Check the size is right
+        assertEquals("size", x.length, u.size());
+        if (step > 0) {
+            // Check before start of slice
+            int px = 0, py = 0;
+            for (; px < start; px++)
+                assertEquals("before slice", x[px], u.intAt(px));
+            // Check slice-affected region at n assignments and n-1 gaps of length step-1.
+            if (n>0) assertEquals("first affected", y[py++], u.intAt(px++));
+            for (int i = 1; i < n; i++) {
+                for (int j = 1; j < step; j++, px++) {
+                    assertEquals("in gap", x[px], u.intAt(px));
+                }
+                assertEquals("next affected", y[py++], u.intAt(px++));
+            }
+            // Check after slice-affected region
+            for (; px < x.length; px++)
+                assertEquals("after slice", x[px], u.intAt(px));
+            
+        } else {
+            // Negative step but easier to think about as a positive number
+            step = -step;
+
+            // Check after start of slice
+            int px = x.length - 1, py = 0;
+            for (; px > start; --px)
+                assertEquals("after slice", x[px], u.intAt(px));
+            // Check slice-affected region at n assignments and n-1 gaps of length step-1.
+            if (n>0) assertEquals("first affected", y[py++], u.intAt(px--));
+            for (int i = 1; i < n; i++) {
+                for (int j = 1; j < step; j++, px--) {
+                    assertEquals("in gap", x[px], u.intAt(px));
+                }
+                assertEquals("next affected", y[py++], u.intAt(px--));
+            }
+            // Check before slice-affected region
+            for (; px >= 0; px--)
+                assertEquals("before slice", x[px], u.intAt(px));
+
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.python.core.BaseBytesTest#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    
+    /**
+     * Test method for {@link PyObject#__getslice__(PyObject, PyObject)}.
+     * 
+     * @see BaseBytes#getslice(int, int)
+     */
+    public void test__getslice__2() {
+        int verbose = 0;
+        // __getslice__() deals with start, stop values also relative to the end.
+        String ver = "D�rob�e au sang de nos c�urs";
+        final int L = ver.length();
+        int[] aRef = toInts(ver);
+        BaseBytes a = getInstance(aRef);
+        List<PyInteger> bList = new ArrayList<PyInteger>(L);
+
+        // Need interpreter (for Py.None and exceptions)
+        interp = new PythonInterpreter();
+
+        final int[] posStart = new int[] {0, 8, 16, L - 5, L - 1};
+
+        for (int start : posStart) {
+            PyObject pyStart, pyStop, pyStart_L, pyStop_L;
+            pyStart = new PyInteger(start);
+            if (start > 0)
+                // The other way of saying [start:stop] is [start-L:stop]
+                pyStart_L = new PyInteger(start - L);
+            else
+                // The other way of saying [0:stop] is [:stop]
+                pyStart_L = Py.None;
+
+            for (int stop = start; stop <= L; stop++) {
+
+                // Make a reference answer by picking elements of aRef in slice pattern
+                bList.clear();
+                for (int i = start; i < stop; i++) {
+                    if (verbose >= 5) System.out.printf("    (%d,%d) i=%d\n", start, stop, i);
+                    bList.add(new PyInteger(aRef[i]));
+                }
+
+                // PyObject versions of stop
+                if (stop < L)
+                    // The other way of saying [start:stop:+s] is [start:stop-L:+s]
+                    pyStop_L = new PyInteger(stop - L);
+                else
+                    // The other way of saying [start:L:+s] is [start::+s]
+                    pyStop_L = Py.None;
+                pyStop = new PyInteger(stop);
+
+                // Generate test result and check it
+                doTest__getslice__2(a, pyStart, pyStop, bList, verbose + 2);
+                // Repeat same result specifying start relative to end
+                doTest__getslice__2(a, pyStart_L, pyStop, bList, verbose);
+                // Repeat same result specifying stop relative to end
+                doTest__getslice__2(a, pyStart, pyStop_L, bList, verbose);
+                // Repeat same result specifying start and stop relative to end
+                doTest__getslice__2(a, pyStart_L, pyStop_L, bList, verbose);
+            }
+        }
+    }
+
+    /**
+     * Common code to check {@link PyByteArray#__getslice__(PyObject, PyObject)} against a reference
+     * answer.
+     * 
+     * @param a object under test
+     * @param pyStart
+     * @param pyStop
+     * @param bList reference answer
+     * @param verbose 0..4 control output
+     */
+    private void doTest__getslice__2(BaseBytes a,
+                                     PyObject pyStart,
+                                     PyObject pyStop,
+                                     List<PyInteger> bList,
+                                     int verbose) {
+        if (verbose >= 4) System.out.printf("    __getslice__(%s,%s)\n", pyStart, pyStop);
+        PyObject b = a.__getslice__(pyStart, pyStop);
+        if (verbose >= 3) System.out.println(toString((BaseBytes)b));
+        checkInts(bList, b);
+    }
+
+    /**
+     * Test method for {@link PyObject#__getslice__(PyObject, PyObject, PyObject)}.
+     * 
+     * @see BaseBytes#getslice(int, int, int)
+     */
+    public void test__getslice__3() {
+        int verbose = 0;
+        // __getslice__() deals with start, stop values also relative to the end.
+        String ver = "Quand je br�le et que tu t'enflammes ;";
+        final int L = ver.length();
+        int[] aRef = toInts(ver);
+        BaseBytes a = getInstance(aRef);
+        List<PyInteger> bList = new ArrayList<PyInteger>(L);
+
+        // Need interpreter (for Py.None and exceptions)
+        interp = new PythonInterpreter();
+
+        // Positive step
+
+        final int[] posStart = new int[] {0, 9, 22, L - 11, L - 1};
+        // final int[] posStart = new int[] {0, 9, L-1};
+
+        for (int step = 1; step < 4; step++) {
+            PyInteger pyStep = new PyInteger(step);
+            for (int start : posStart) {
+                PyObject pyStart, pyStop, pyStart_L, pyStop_L;
+                pyStart = new PyInteger(start);
+                if (start > 0)
+                    // The other way of saying [start:stop:+s] is [start-L:stop:+s]
+                    pyStart_L = new PyInteger(start - L);
+                else
+                    // The other way of saying [0:stop:+s] is [:stop:+s]
+                    pyStart_L = Py.None;
+
+                for (int stop = start; stop <= L; stop++) {
+
+                    // Make a reference answer by picking elements of aRef in slice pattern
+                    bList.clear();
+                    for (int i = start; i < stop; i += step) {
+                        if (verbose >= 5) System.out.printf("    (%d,%d,%d) i=%d\n", start, stop,
+                                                            step, i);
+                        bList.add(new PyInteger(aRef[i]));
+                    }
+
+                    // PyObject versions of stop
+                    if (stop < L)
+                        // The other way of saying [start:stop:+s] is [start:stop-L:+s]
+                        pyStop_L = new PyInteger(stop - L);
+                    else
+                        // The other way of saying [start:L:+s] is [start::+s]
+                        pyStop_L = Py.None;
+                    pyStop = new PyInteger(stop);
+
+                    // Generate test result and check it
+                    doTest__getslice__3(a, pyStart, pyStop, pyStep, bList, verbose + 2);
+                    // Repeat same result specifying start relative to end
+                    doTest__getslice__3(a, pyStart_L, pyStop, pyStep, bList, verbose);
+                    // Repeat same result specifying stop relative to end
+                    doTest__getslice__3(a, pyStart, pyStop_L, pyStep, bList, verbose);
+                    // Repeat same result specifying start and stop relative to end
+                    doTest__getslice__3(a, pyStart_L, pyStop_L, pyStep, bList, verbose);
+                }
+            }
+        }
+
+        // Negative step
+
+        final int[] negStart = new int[] {0, 5, 14, L - 10, L - 1};
+        // final int[] negStart = new int[] {0, 5, L-1};
+
+        for (int step = -1; step > -4; step--) {
+            PyInteger pyStep = new PyInteger(step);
+            for (int start : negStart) {
+                PyObject pyStart, pyStop, pyStart_L, pyStop_L;
+                pyStart = new PyInteger(start);
+                if (start < L - 1)
+                    // The other way of saying [start:stop:-s] is [start-L:stop:-s]
+                    pyStart_L = new PyInteger(start - L);
+                else
+                    // The other way of saying [L-1:stop:-s] is [:stop:-s]
+                    pyStart_L = Py.None;
+
+                for (int stop = start; stop >= -1; stop--) {
+
+                    // Make a reference answer by picking elements of aRef in slice pattern
+                    bList.clear();
+                    for (int i = start; i > stop; i += step) {
+                        if (verbose >= 5) System.out.printf("    (%d,%d,%d) i=%d\n", start, stop,
+                                                            step, i);
+                        bList.add(new PyInteger(aRef[i]));
+                    }
+
+                    // PyObject versions of stop
+                    if (stop >= 0)
+                        // The other way of saying [start:stop:-s] is [start:stop-L:-s]
+                        pyStop_L = new PyInteger(stop - L);
+                    else {
+                        // intended final value is 0, but [start:-1:-s] doesn't mean that
+                        stop = -(L+1);      // This does.
+                        pyStop_L = Py.None; // And so does [start::-s]
+                    }
+                    pyStop = new PyInteger(stop);
+                    
+                    // Generate test result and check it
+                    doTest__getslice__3(a, pyStart, pyStop, pyStep, bList, verbose + 2);
+                    // Repeat same result specifying start relative to end
+                    doTest__getslice__3(a, pyStart_L, pyStop, pyStep, bList, verbose);
+                    // Repeat same result specifying stop relative to end
+                    doTest__getslice__3(a, pyStart, pyStop_L, pyStep, bList, verbose);
+                    // Repeat same result specifying start and stop relative to end
+                    doTest__getslice__3(a, pyStart_L, pyStop_L, pyStep, bList, verbose);
+                }
+            }
+        }
+    }
+
+    /**
+     * Common code to check {@link PyByteArray#__getslice__(PyObject, PyObject, PyObject)} against a
+     * reference answer.
+     * 
+     * @param a answer from method under test
+     * @param pyStart
+     * @param pyStop
+     * @param pyStep
+     * @param bList reference answer
+     * @param verbose 0..4 control output
+     */
+    private void doTest__getslice__3(BaseBytes a,
+                                     PyObject pyStart,
+                                     PyObject pyStop,
+                                     PyObject pyStep,
+                                     List<PyInteger> bList,
+                                     int verbose) {
+        if (verbose >= 4) System.out.printf("    __getslice__(%s,%s,%s)\n", pyStart, pyStop, pyStep);
+        PyObject b = a.__getslice__(pyStart, pyStop, pyStep);
+        if (verbose >= 3) System.out.println(toString((BaseBytes)b));
+        checkInts(bList, b);
+    }
+    
+    
+    /**
+     * Test method for {@link PyByteArray#__setitem__(int,PyObject)}, and through it of
+     * {@link PyByteArray#pyset(int,PyObject)}.
+     */
+    public void testPyset() {
+        int verbose = 0;
+
+        // Need interpreter
+        interp = new PythonInterpreter();
+
+        // Fill with random stuff
+        int[] aRef = randomInts(random, MEDIUM);
+        BaseBytes a = getInstance(aRef);
+        for (int i = 0; i < MEDIUM; i++) {
+            int b = aRef[i] ^ 0x55; // != a[i]
+            PyInteger pyb = new PyInteger(b);
+            a.__setitem__(i, pyb);
+            int ai = a.pyget(i).asInt();
+            if (verbose >= 3) {
+                System.out.printf("    __setitem__(%2d,%3d) : a[%2d]=%3d\n", i, b, i, ai);
+            }
+            assertEquals(b, ai);
+        }
+
+        // Check ValueError exceptions generated
+        int[] badValue = {256, Integer.MAX_VALUE, -1, -2, -100, -0x10000, Integer.MIN_VALUE};
+        for (int i : badValue) {
+            PyInteger b = new PyInteger(i);
+            try {
+                a.__setitem__(0, b);
+                fail("Exception not thrown for __setitem__(" + 0 + ", " + b + ")");
+            } catch (PyException pye) {
+                assertEquals(Py.ValueError, pye.type);
+                if (verbose >= 2) System.out.printf("    Exception: %s\n", pye);
+            }
+        }
+
+        // Check IndexError exceptions generated
+        PyInteger x = new PyInteger(10);
+        for (int i : new int[] {-1 - MEDIUM, -100 - MEDIUM, MEDIUM, MEDIUM + 1}) {
+            try {
+                a.__setitem__(i, x);
+                fail("Exception not thrown for __setitem__(" + i + ", x)");
+            } catch (PyException pye) {
+                assertEquals(Py.IndexError, pye.type);
+                if (verbose >= 2) System.out.printf("    Exception: %s\n", pye);
+            }
+        }
+
+    }
+
+    /**
+     * Test method for {@link org.python.core.PyByteArray#setslice(int,int,int,PyObject)}, when the
+     * slice to replace is simple (a contiguous 2-argument slice).
+     */
+    public void testSetslice2() {
+        int verbose = 0;
+
+        // Tests where we transform aaaaaDDDDbbbbb into aaaaaEEEEEEEbbbbb.
+        // Lists of the lengths to try, for each of the aaaa, DDDD, bbbb, EEEEEE sections
+        int[] naList = {2, 5, 0}; // Interesting cases: slice is at start, or not at start
+        int[] ndList = {5, 20, 0}; // Slice to replace is small, large or zero
+        int[] nbList = {4, 7, 0}; // Interesting cases: slice is at end, or not at end
+        int[] neList = {4, 5, 6, 20, 0}; // Insert smaller, same, large or zero
+
+        for (int ne : neList) {
+            int[] eInts = new int[ne];
+            Arrays.fill(eInts, 'E');
+            PyByteArray e = new PyByteArray(eInts);
+
+            for (int nd : ndList)
+                for (int na : naList)
+                    for (int nb : nbList) {
+                        int[] aRef = adbInts(na, nd, nb);
+                        int[] bRef = aebInts(na, ne, nb);
+
+                        PyByteArray b = getInstance(aRef);
+
+                        byte[] oldStorage = b.storage;
+
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(%d,%d,%d,e[len=%d])\n",
+                                              na, na + nd, 1, ne);
+                            if (verbose >= 3) System.out.println(toString(b));
+                        }
+
+                        b.setslice(na, na + nd, 1, e);
+
+                        if (verbose >= 2) {
+                            boolean avAlloc = (b.storage != oldStorage)
+                                    && (bRef.length <= oldStorage.length);
+                            if (b.storage.length * 2 < oldStorage.length) avAlloc = false;
+                            System.out.println(toString(b) + (avAlloc ? " avoidable new" : ""));
+                        }
+                        checkInts(bRef, b);
+                    }
+        }
+
+        // Insertions at a range of positions and all sizes with random data
+
+        final int AMAX = SMALL;
+        final int BMAX = SMALL;
+        final int DMAX = MEDIUM;
+        final int EMAX = MEDIUM;
+
+        int[] xInts = randomInts(random, AMAX + DMAX + BMAX, 'u', 'z');
+        int[] yInts = randomInts(random, EMAX, 'A', 'H');
+        PyByteArray x = getInstance(xInts);
+        PyByteArray y = getInstance(yInts);
+
+        int[] nbList2 = {0, 1, BMAX};
+
+        for (int na = 0; na <= AMAX; na++)
+            for (int nb : nbList2) {
+                for (int nd = 0; nd < DMAX; nd++)
+                    for (int ne = 0; ne < EMAX; ne++) {
+                        PyByteArray u = x.getslice(0, na + nd + nb, 1);
+                        PyByteArray e = y.getslice(0, ne, 1);
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(start=%d, stop=%d, step=%d, e[len=%d])\n",
+                                              na, na + nd, 1, ne);
+                            if (verbose >= 3) {
+                                System.out.println("u = " + toString(u));
+                                System.out.println("e = " + toString(e));
+                            }
+                        }
+                        u.setslice(na, na + nd, 1, e);
+                        if (verbose >= 1) System.out.println("u'= " + toString(u));
+                        checkSlice(na, nd, nb, ne, xInts, yInts, u);
+                    }
+            }
+    }
+
+    /**
+     * Test method for {@link PyByteArray#__setslice__(PyObject, PyObject, PyObject)}, when the
+     * slice to replace is simple (a contiguous 2-argument slice).
+     */
+    public void test__setslice__2() {
+        int verbose = 0;
+        // __setslice__() deals with start, stop values also relative to the end.
+        String ver = "Cet autre affecte tes langueurs";
+        final int L = ver.length();
+        int[] uRef = toInts(ver);
+
+        // Need interpreter (for Py.None and exceptions)
+        interp = new PythonInterpreter();
+
+        // Source of assigned values.
+        int[] eRef = randomInts(random, 2*SMALL, 'V', 'Z');
+        BaseBytes eFull = new BaseBytesTest.MyBytes(eRef);
+
+        final int[] posStart = new int[] {0, 4, 10, 18, L - 9};
+        final int[] posStop = new int[] {0, 3, 9, 17, L - 10, L};
+
+        for (int start : posStart) {
+            PyObject pyStart, pyStop, pyStart_L, pyStop_L;
+            pyStart = new PyInteger(start);
+            if (start > 0)
+                // The other way of saying [start:stop] is [start-L:stop]
+                pyStart_L = new PyInteger(start - L);
+            else
+                // The other way of saying [0:stop] is [:stop]
+                pyStart_L = Py.None;
+
+            for (int stop : posStop) {
+                if (stop < start) continue; // Skip backwards cases
+
+                // PyObject versions of stop
+                if (stop < L)
+                    // The other way of saying [start:stop] is [start:stop-L]
+                    pyStop_L = new PyInteger(stop - L);
+                else
+                    // The other way of saying [start:L] is [start:]
+                    pyStop_L = Py.None;
+                pyStop = new PyInteger(stop);
+
+                for (int n = 0; n <= eRef.length; n++) {
+                    // Generate test result and check it
+                    doTest__setslice__2(uRef, pyStart, pyStop, eFull, n, eRef, start, stop,
+                                        verbose + 2);
+                    // Repeat same result specifying start relative to end
+                    doTest__setslice__2(uRef, pyStart_L, pyStop, eFull, n, eRef, start, stop,
+                                        verbose);
+                    // Repeat same result specifying stop relative to end
+                    doTest__setslice__2(uRef, pyStart, pyStop_L, eFull, n, eRef, start, stop,
+                                        verbose);
+                    // Repeat same result specifying start and stop relative to end
+                    doTest__setslice__2(uRef, pyStart_L, pyStop_L, eFull, n, eRef, start, stop,
+                                        verbose);
+                }
+            }
+        }
+    }
+
+    /**
+     * Common code to check {@link PyByteArray#__setslice__(PyObject, PyObject, PyObject)} against a
+     * reference answer.
+     * 
+     * @param uRef to initialise the object to test
+     * @param pyStart
+     * @param pyStop
+     * @param eFull byte array from which to take a slice to insert
+     * @param n length of the slice to take from eFull
+     * @param eRef from which eFull was initialised
+     * @param verbose 0..4 control output
+     */
+    private void doTest__setslice__2(int[] uRef,
+                                     PyObject pyStart,
+                                     PyObject pyStop,
+                                     BaseBytes eFull,
+                                     int n,
+                                     int[] eRef,
+                                     int start, int stop, int verbose) {
+        PyByteArray u = getInstance(uRef);
+        BaseBytes e = eFull.getslice(0, n, 1);
+        if (verbose >= 4) {
+            System.out.printf("    __setslice__(%s,%s,e[0:%d])\n", pyStart, pyStop, n);
+            System.out.println("u = " + toString(u));
+            System.out.println("e = " + toString(e));
+        }
+        // Now do the test
+        u.__setslice__(pyStart, pyStop, e);
+        if (verbose >= 3) System.out.println("u'= " + toString(u));
+        int nd = stop-start;
+        int nb = uRef.length-stop;
+        checkSlice(start, nd, nb, n, uRef, eRef, u);
+    }
+    
+    /**
+     * Test method for {@link org.python.core.PyByteArray#setslice(int,int,int,PyObject)}, when the
+     * slice to replace is extended (3-argument slice and step!=0). Note that PySequence checks and
+     * converts arguments first, so we need only test with valid combinations of indices.
+     */
+    public void testSetslice3() {
+        int verbose = 0;
+
+        // Need interpreter
+        interp = new PythonInterpreter();
+
+        // Source of assigned values.
+        int[] eRef = randomInts(random, MEDIUM, 'A', 'H');
+        BaseBytes eFull = new BaseBytesTest.MyBytes(eRef);
+        int[] uRef = randomInts(random, MEDIUM, 'm', 's');
+
+        // Positive step sizes we will try
+        int[] posStep = {2, 3, 5, 8, 25, 100};
+
+        for (int start = 0; start < uRef.length; start++) {
+            // Bytes from start to end of array
+            int len = uRef.length - start;
+            for (int step : posStep) {
+                // Allowable number of assignments to end of array at given step size
+                int nmax = (len + step - 1) / step;
+                for (int n = 1; n <= nmax; n++) {
+                    // Location of last i
+                    int last = start + step * (n - 1) + 1;
+                    // But any stop value in this range results in n assignments
+                    for (int stop = last + 1; stop < last + step; stop++) {
+                        // Now do the test
+                        PyByteArray u = getInstance(uRef);
+                        BaseBytes e = eFull.getslice(0, n, 1);
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(start=%d, stop=%d, step=%d, e[len=%d])\n",
+                                              start, stop, step, n);
+                            if (verbose >= 3) {
+                                System.out.println("u = " + toString(u));
+                                System.out.println("e = " + toString(e));
+                            }
+                        }
+                        u.setslice(start, stop, step, e);
+                        if (verbose >= 1) System.out.println("u'= " + toString(u));
+                        checkSlice(start, step, n, uRef, eRef, u);
+                    }
+                }
+            }
+        }
+
+        // Negative step sizes we will try
+        int[] negStep = {-1, -2, -5, -8, -25, -100};
+
+        for (int start = uRef.length - 1; start >= 0; start--) {
+            // Bytes from slice start to start of array
+            int len = start + 1;
+            for (int step : negStep) {
+                // Allowable number of assignments to end of array at given step size
+                int nmax = (len + (-step) - 1) / (-step);
+                for (int n = 1; n <= nmax; n++) {
+                    // Location of last i
+                    int last = start + step * (n - 1) - 1;
+                    // But any stop value in this range results in n assignments
+                    for (int stop = last; stop > last - (-step) && stop >= 0; stop--) {
+                        // Now do the test
+                        PyByteArray u = getInstance(uRef);
+                        BaseBytes e = eFull.getslice(0, n, 1);
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(start=%d, stop=%d, step=%d, e[len=%d])\n",
+                                              start, stop, step, n);
+                            if (verbose >= 3) {
+                                System.out.println("u = " + toString(u));
+                                System.out.println("e = " + toString(e));
+                            }
+                        }
+                        u.setslice(start, stop, step, e);
+                        if (verbose >= 1) System.out.println("u'= " + toString(u));
+                        checkSlice(start, step, n, uRef, eRef, u);
+                    }
+                }
+            }
+        }
+
+    }
+    
+    
+    /**
+     * Test method for {@link org.python.core.PyByteArray#setslice(int,int,int,PyObject)}, when the
+     * slice to replace is extended (3-argument slice and step!=0). Note that PySequence checks and
+     * converts arguments first, so we need only test with valid combinations of indices.
+     */
+    public void test__setslice__3() {
+        int verbose = 0;
+
+        // Need interpreter
+        interp = new PythonInterpreter();
+
+        // Source of assigned values.
+        int[] eRef = randomInts(random, MEDIUM, 'A', 'H');
+        BaseBytes eFull = new BaseBytesTest.MyBytes(eRef);
+
+        // Forwards cases
+
+        int[] uRef = randomInts(random, MEDIUM, 'm', 's');
+
+        // Positive step sizes we will try
+        int[] posStep = {2, 3, 5, 8, 25, 100};
+
+        for (int start = 0; start < uRef.length; start++) {
+            PyInteger pyStart = new PyInteger(start);
+            // Bytes from start to end of array
+            int len = uRef.length - start;
+            for (int step : posStep) {
+                PyInteger pyStep = new PyInteger(step);
+                // Allowable number of assignments to end of array at given step size
+                int nmax = (len + step - 1) / step;
+                for (int n = 1; n <= nmax; n++) {
+                    // Location of last i
+                    int last = start + step * (n - 1) + 1;
+                    // But any stop value in this range results in n assignments
+                    for (int stop = last + 1; stop < last + step; stop++) {
+                        PyInteger pyStop = new PyInteger(stop);
+                        // Now do the test
+                        PyByteArray u = getInstance(uRef);
+                        BaseBytes e = eFull.getslice(0, n, 1);
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(%d,%d,%d, e[len=%d])\n",
+                                              start, stop, step, n);
+                            if (verbose >= 3) {
+                                System.out.println("u = " + toString(u));
+                                System.out.println("e = " + toString(e));
+                            }
+                        }
+                        u.__setslice__(pyStart, pyStop, pyStep, e);
+                        if (verbose >= 1) System.out.println("u'= " + toString(u));
+                        checkSlice(start, step, n, uRef, eRef, u);
+                    }
+                }
+            }
+        }
+
+        // Negative step sizes we will try
+        int[] negStep = {-1, -2, -5, -8, -25, -100};
+
+        for (int start = uRef.length - 1; start >= 0; start--) {
+            PyInteger pyStart = new PyInteger(start);
+            // Bytes from slice start to start of array
+            int len = start + 1;
+            for (int step : negStep) {
+                PyInteger pyStep = new PyInteger(step);
+                // Allowable number of assignments to end of array at given step size
+                int nmax = (len + (-step) - 1) / (-step);
+                for (int n = 1; n <= nmax; n++) {
+                    // Location of last i
+                    int last = start + step * (n - 1) - 1;
+                    // But any stop value in this range results in n assignments
+                    for (int stop = last; stop > last - (-step) && stop >= 0; stop--) {
+                        PyInteger pyStop = new PyInteger(stop);
+                        // Now do the test
+                        PyByteArray u = getInstance(uRef);
+                        BaseBytes e = eFull.getslice(0, n, 1);
+                        if (verbose >= 2) {
+                            System.out.printf("setslice(%d,%d,%d, e[len=%d])\n",
+                                              start, stop, step, n);
+                            if (verbose >= 3) {
+                                System.out.println("u = " + toString(u));
+                                System.out.println("e = " + toString(e));
+                            }
+                        }
+                        u.__setslice__(pyStart, pyStop, pyStep, e);
+                        if (verbose >= 1) System.out.println("u'= " + toString(u));
+                        checkSlice(start, step, n, uRef, eRef, u);
+                    }
+                }
+            }
+        }
+
+    }
+
+    /**
+     * Performance for {@link org.python.core.PyByteArray#setslice(int,int,int,PyObject)}, when the
+     * slice to replace is simple and contiguous (2-argument slice).
+     */
+    public void testSetsliceTime() {
+        int verbose = 0;
+        timeSetslice(100, SMALL, 2*SMALL, verbose);
+        timeSetslice(100, MEDIUM, MEDIUM, verbose);
+        timeSetslice(10, LARGE, LARGE/5, verbose);
+        timeSetslice(10, HUGE, HUGE/5, verbose);
+    }
+
+    /**
+     * Tabulate the elapsed time for calls to setslice, for a given array size and maximum slice
+     * length to insert arrays of a range of sizes.
+     * 
+     * @param repeats number of repeats over which to average
+     * @param N of bytearray subjected to the change
+     * @param M Size of change (inserted, removed or replaced slice)
+     * @param verbose Control level of textual output 0=none CSV-style, 1=just the timings, etc..
+     */
+    protected void timeSetslice(int repeats, int M, int N, int verbose) {
+
+        // Trials we intend to do: insertion at a variety of points.
+        int[] startList = new int[11]; // 11 means 0%, 10%, 20%, ... 100% of N
+        for (int i = 0; i < startList.length; i++)
+            startList[i] = N * i / (startList.length - 1);
+
+        // Insertion slice sizes.
+        int[] changeList = new int[11]; // 0%, ... 100% of M
+        for (int i = 0; i < changeList.length; i++)
+            changeList[i] = M * i / (changeList.length - 1);
+
+        // We are going to tabulate this for each startList and changeList entry.
+        long[][] elapsed = new long[startList.length][changeList.length];
+        // Initialise the timing record
+        for (int row = 0; row < startList.length; row++)
+            for (int col = 0; col < changeList.length; col++)
+                elapsed[row][col] = Long.MAX_VALUE;
+
+        // Create test material as bytearrays
+        int[] xRef = randomInts(random, N, 'u', 'z');
+        PyByteArray x = getInstance(xRef);
+        int[] yRef = randomInts(random, M, 'A', 'H');
+        PyByteArray y = getInstance(yRef);
+
+        // We will time repeated calls: need a fresh bytearray each time
+        PyByteArray[] u = new PyByteArray[repeats];
+
+        // Now take the shortest of 10 trials in each row and column
+
+        // Work through the combinations necessary
+        for (int trial = 0; trial < 10; trial++) {
+        for (int row = 0; row < startList.length; row++) {
+            int na = startList[row];
+            int nd = 0;
+            // nd = changeList[3];     // XXX experiment
+            // if (na+nd>N) nd = N-na; // XXX experiment
+            for (int col = 0; col < changeList.length; col++) {
+                int ne = changeList[col];
+                int start = na;
+                int stop = na + nd;
+                // Data to replace the slice with
+                PyByteArray e = y.getslice(0, ne, 1);
+
+                    if (trial == 0) {
+                        // First trial: do once untimed in order ensure classes loaded.
+                        doTimeSetslice(u, start, stop, e, x, verbose);
+                        checkSlice(na, nd, N - (na + nd), ne, xRef, yRef, u[0]);
+                    }
+
+                    // Now do the trial properly
+                    long t = doTimeSetslice(u, start, stop, e, x, -1);
+
+                    // Retain the shortest time so far
+                    if (t < elapsed[row][col]) elapsed[row][col] = t;
+                }
+            }
+        }
+
+        // Tabulate the time for each array size and change size
+
+        System.out.print("     N  ,     na  ");
+        for (int col = 0; col < changeList.length; col++)
+            System.out.printf(", ne=%7d", changeList[col]);
+        System.out.println(", elements inserted: time in microseconds.");
+
+        for (int row = 0; row < startList.length; row++) {
+            System.out.printf("%8d, %8d", N, startList[row]);
+            for (int col = 0; col < changeList.length; col++) {
+                double usPerCall = (1e-3 * elapsed[row][col]) / repeats;
+                System.out.printf(", %10.3f", usPerCall);
+            }
+            System.out.println();
+        }
+
+    }
+
+    /**
+     * Time trial of {@link PyByteArray#setslice(int,int,int)}. Every element of the array of test
+     * objects will be initialised to the same value then the specified slice replacement will take
+     * place, with the block of repetitions timed.
+     * 
+     * @param u array of test objects
+     * @param start
+     * @param stop
+     * @param e to insert over [start:stop]
+     * @param x value from which to initialise each test object
+     * @param verbose amount of output
+     * @return elapsed time in nanoseconds for setslice operation on array of objects
+     */
+    private long doTimeSetslice(PyByteArray[] u,
+                                      int start,
+                                      int stop,
+                                      BaseBytes e,
+                                      BaseBytes x,
+                                      int verbose) {
+
+        // The call is either to do a time trial (block of test objects) or one test
+        int repeats = 1;
+        if (verbose < 0)
+            // We're doing a timed trial on an array of identical objects.
+            repeats = u.length;
+        else
+            // We're testing the correctness of the code with one object.
+            repeats = 1;
+
+        // Set up clean bytearray objects
+        for (int i = 0; i < repeats; i++)
+            u[i] = new PyByteArray(x);
+
+        // First trial: do once untimed in order ensure classes loaded.
+        PyByteArray v = u[0];
+        byte[] oldStorage = v.storage;
+
+        if (verbose >= 3) {
+            System.out.printf("setslice(%d,%d,%d,e[%d])\n", start, stop, 1, e.size());
+            System.out.println("u = " + toString(v));
+            System.out.println("e = " + toString(e));
+        }
+
+        // Start the clock
+        long beginTime = System.nanoTime();
+        // Do the work lots of times
+        for (int i = 0; i < repeats; i++)
+            u[i].setslice(start, stop, 1, e);
+        // Stop the clock
+        long t = System.nanoTime() - beginTime;
+
+        // Diagnostic printout
+        if (verbose >= 2) {
+            byte[] newStorage = v.storage;
+            boolean avAlloc = (newStorage != oldStorage);
+            if (newStorage.length * 2 < oldStorage.length) avAlloc = false;
+            System.out.println("u'= " + toString(v) + (avAlloc ? " new" : ""));
+        }
+
+        return t;
+    }
+    
+    
+//    /**
+//     * Test method for {@link org.python.core.PyByteArray#del(int)}.
+//     */
+//    public void testDel() {
+//        fail("Not yet implemented");
+//    }
+//
+//    /**
+//     * Test method for {@link org.python.core.PyByteArray#delRange(int, int)}.
+//     */
+//    public void testDelRange() {
+//        fail("Not yet implemented");
+//    }
+//
+    
+    
+    
+    /*
+     * Note that JUnit test classes extending this one inherit all the test* methods, and they will
+     * be run by JUnit. Each test uses getInstance() methods where it might have used a constructor
+     * with a similar signature. The idea is to override the getInstance() methods to return an
+     * instance of the class actually under test in the derived test.
+     */
+    public PyByteArray getInstance(PyType type) {
+        return new PyByteArray(type);
+    }
+
+    public PyByteArray getInstance() {
+        return new PyByteArray();
+    }
+
+    public PyByteArray getInstance(int size) {
+        return new PyByteArray(size);
+    }
+
+    public PyByteArray getInstance(int[] value) {
+        return new PyByteArray(value);
+    }
+
+    public PyByteArray getInstance(BaseBytes source) {
+        return new PyByteArray(source);
+    }
+
+    public PyByteArray getInstance(Iterable<? extends PyObject> source) {
+        return new PyByteArray(source);
+    }
+
+    public PyByteArray getInstance(PyString arg, PyObject encoding, PyObject errors) {
+        return new PyByteArray(arg, encoding, errors);
+    }
+
+    public PyByteArray getInstance(PyString arg, String encoding, String errors) {
+        return new PyByteArray(arg, encoding, errors);
+    }
+
+    public PyByteArray getInstance(PyObject arg) throws PyException {
+        return new PyByteArray(arg);
+    }
+    
+    
+}

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list