Author: Manuel Jacob
Branch: refactor-str-types
Changeset: r66168:dfad685e1e9c
Date: 2013-08-15 23:35 +0200
http://bitbucket.org/pypy/pypy/changeset/dfad685e1e9c/

Log:    Add docstrings for bytearray.

diff --git a/pypy/objspace/std/bytearrayobject.py 
b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -383,87 +383,570 @@
     return -1
 
 
+class BytearrayDocstrings:
+    """bytearray(iterable_of_ints) -> bytearray
+    bytearray(string, encoding[, errors]) -> bytearray
+    bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray
+    bytearray(memory_view) -> bytearray
+
+    Construct an mutable bytearray object from:
+      - an iterable yielding integers in range(256)
+      - a text string encoded using the specified encoding
+      - a bytes or a bytearray object
+      - any object implementing the buffer API.
+
+    bytearray(int) -> bytearray.
+
+    Construct a zero-initialized bytearray of the given length.
+
+    """
+
+    def __add__():
+        """x.__add__(y) <==> x+y"""
+
+    def __alloc__():
+        """B.__alloc__() -> int
+
+        Return the number of bytes actually allocated.
+        """
+
+    def __contains__():
+        """x.__contains__(y) <==> y in x"""
+
+    def __delitem__():
+        """x.__delitem__(y) <==> del x[y]"""
+
+    def __eq__():
+        """x.__eq__(y) <==> x==y"""
+
+    def __ge__():
+        """x.__ge__(y) <==> x>=y"""
+
+    def __getattribute__():
+        """x.__getattribute__('name') <==> x.name"""
+
+    def __getitem__():
+        """x.__getitem__(y) <==> x[y]"""
+
+    def __gt__():
+        """x.__gt__(y) <==> x>y"""
+
+    def __iadd__():
+        """x.__iadd__(y) <==> x+=y"""
+
+    def __imul__():
+        """x.__imul__(y) <==> x*=y"""
+
+    def __init__():
+        """x.__init__(...) initializes x; see help(type(x)) for signature"""
+
+    def __iter__():
+        """x.__iter__() <==> iter(x)"""
+
+    def __le__():
+        """x.__le__(y) <==> x<=y"""
+
+    def __len__():
+        """x.__len__() <==> len(x)"""
+
+    def __lt__():
+        """x.__lt__(y) <==> x<y"""
+
+    def __mul__():
+        """x.__mul__(n) <==> x*n"""
+
+    def __ne__():
+        """x.__ne__(y) <==> x!=y"""
+
+    def __reduce__():
+        """Return state information for pickling."""
+
+    def __repr__():
+        """x.__repr__() <==> repr(x)"""
+
+    def __rmul__():
+        """x.__rmul__(n) <==> n*x"""
+
+    def __setitem__():
+        """x.__setitem__(i, y) <==> x[i]=y"""
+
+    def __sizeof__():
+        """B.__sizeof__() -> int
+
+        Returns the size of B in memory, in bytes
+        """
+
+    def __str__():
+        """x.__str__() <==> str(x)"""
+
+    def append():
+        """B.append(int) -> None
+
+        Append a single item to the end of B.
+        """
+
+    def capitalize():
+        """B.capitalize() -> copy of B
+
+        Return a copy of B with only its first character capitalized (ASCII)
+        and the rest lower-cased.
+        """
+
+    def center():
+        """B.center(width[, fillchar]) -> copy of B
+
+        Return B centered in a string of length width.  Padding is
+        done using the specified fill character (default is a space).
+        """
+
+    def count():
+        """B.count(sub[, start[, end]]) -> int
+
+        Return the number of non-overlapping occurrences of subsection sub in
+        bytes B[start:end].  Optional arguments start and end are interpreted
+        as in slice notation.
+        """
+
+    def decode():
+        """B.decode(encoding=None, errors='strict') -> unicode
+
+        Decode B using the codec registered for encoding. encoding defaults
+        to the default encoding. errors may be given to set a different error
+        handling scheme.  Default is 'strict' meaning that encoding errors 
raise
+        a UnicodeDecodeError.  Other possible values are 'ignore' and 'replace'
+        as well as any other name registered with codecs.register_error that is
+        able to handle UnicodeDecodeErrors.
+        """
+
+    def endswith():
+        """B.endswith(suffix[, start[, end]]) -> bool
+
+        Return True if B ends with the specified suffix, False otherwise.
+        With optional start, test B beginning at that position.
+        With optional end, stop comparing B at that position.
+        suffix can also be a tuple of strings to try.
+        """
+
+    def expandtabs():
+        """B.expandtabs([tabsize]) -> copy of B
+
+        Return a copy of B where all tab characters are expanded using spaces.
+        If tabsize is not given, a tab size of 8 characters is assumed.
+        """
+
+    def extend():
+        """B.extend(iterable_of_ints) -> None
+
+        Append all the elements from the iterator or sequence to the
+        end of B.
+        """
+
+    def find():
+        """B.find(sub[, start[, end]]) -> int
+
+        Return the lowest index in B where subsection sub is found,
+        such that sub is contained within B[start,end].  Optional
+        arguments start and end are interpreted as in slice notation.
+
+        Return -1 on failure.
+        """
+
+    def fromhex():
+        """bytearray.fromhex(string) -> bytearray (static method)
+
+        Create a bytearray object from a string of hexadecimal numbers.
+        Spaces between two numbers are accepted.
+        Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\xb9\x01\xef').
+        """
+
+    def index():
+        """B.index(sub[, start[, end]]) -> int
+
+        Like B.find() but raise ValueError when the subsection is not found.
+        """
+
+    def insert():
+        """B.insert(index, int) -> None
+
+        Insert a single item into the bytearray before the given index.
+        """
+
+    def isalnum():
+        """B.isalnum() -> bool
+
+        Return True if all characters in B are alphanumeric
+        and there is at least one character in B, False otherwise.
+        """
+
+    def isalpha():
+        """B.isalpha() -> bool
+
+        Return True if all characters in B are alphabetic
+        and there is at least one character in B, False otherwise.
+        """
+
+    def isdigit():
+        """B.isdigit() -> bool
+
+        Return True if all characters in B are digits
+        and there is at least one character in B, False otherwise.
+        """
+
+    def islower():
+        """B.islower() -> bool
+
+        Return True if all cased characters in B are lowercase and there is
+        at least one cased character in B, False otherwise.
+        """
+
+    def isspace():
+        """B.isspace() -> bool
+
+        Return True if all characters in B are whitespace
+        and there is at least one character in B, False otherwise.
+        """
+
+    def istitle():
+        """B.istitle() -> bool
+
+        Return True if B is a titlecased string and there is at least one
+        character in B, i.e. uppercase characters may only follow uncased
+        characters and lowercase characters only cased ones. Return False
+        otherwise.
+        """
+
+    def isupper():
+        """B.isupper() -> bool
+
+        Return True if all cased characters in B are uppercase and there is
+        at least one cased character in B, False otherwise.
+        """
+
+    def join():
+        """B.join(iterable_of_bytes) -> bytearray
+
+        Concatenate any number of str/bytearray objects, with B
+        in between each pair, and return the result as a new bytearray.
+        """
+
+    def ljust():
+        """B.ljust(width[, fillchar]) -> copy of B
+
+        Return B left justified in a string of length width. Padding is
+        done using the specified fill character (default is a space).
+        """
+
+    def lower():
+        """B.lower() -> copy of B
+
+        Return a copy of B with all ASCII characters converted to lowercase.
+        """
+
+    def lstrip():
+        """B.lstrip([bytes]) -> bytearray
+
+        Strip leading bytes contained in the argument
+        and return the result as a new bytearray.
+        If the argument is omitted, strip leading ASCII whitespace.
+        """
+
+    def partition():
+        """B.partition(sep) -> (head, sep, tail)
+
+        Search for the separator sep in B, and return the part before it,
+        the separator itself, and the part after it.  If the separator is not
+        found, returns B and two empty bytearray objects.
+        """
+
+    def pop():
+        """B.pop([index]) -> int
+
+        Remove and return a single item from B. If no index
+        argument is given, will pop the last value.
+        """
+
+    def remove():
+        """B.remove(int) -> None
+
+        Remove the first occurrence of a value in B.
+        """
+
+    def replace():
+        """B.replace(old, new[, count]) -> bytearray
+
+        Return a copy of B with all occurrences of subsection
+        old replaced by new.  If the optional argument count is
+        given, only the first count occurrences are replaced.
+        """
+
+    def reverse():
+        """B.reverse() -> None
+
+        Reverse the order of the values in B in place.
+        """
+
+    def rfind():
+        """B.rfind(sub[, start[, end]]) -> int
+
+        Return the highest index in B where subsection sub is found,
+        such that sub is contained within B[start,end].  Optional
+        arguments start and end are interpreted as in slice notation.
+
+        Return -1 on failure.
+        """
+
+    def rindex():
+        """B.rindex(sub[, start[, end]]) -> int
+
+        Like B.rfind() but raise ValueError when the subsection is not found.
+        """
+
+    def rjust():
+        """B.rjust(width[, fillchar]) -> copy of B
+
+        Return B right justified in a string of length width. Padding is
+        done using the specified fill character (default is a space)
+        """
+
+    def rpartition():
+        """B.rpartition(sep) -> (head, sep, tail)
+
+        Search for the separator sep in B, starting at the end of B,
+        and return the part before it, the separator itself, and the
+        part after it.  If the separator is not found, returns two empty
+        bytearray objects and B.
+        """
+
+    def rsplit():
+        """B.rsplit(sep=None, maxsplit=-1) -> list of bytearrays
+
+        Return a list of the sections in B, using sep as the delimiter,
+        starting at the end of B and working to the front.
+        If sep is not given, B is split on ASCII whitespace characters
+        (space, tab, return, newline, formfeed, vertical tab).
+        If maxsplit is given, at most maxsplit splits are done.
+        """
+
+    def rstrip():
+        """B.rstrip([bytes]) -> bytearray
+
+        Strip trailing bytes contained in the argument
+        and return the result as a new bytearray.
+        If the argument is omitted, strip trailing ASCII whitespace.
+        """
+
+    def split():
+        """B.split(sep=None, maxsplit=-1) -> list of bytearrays
+
+        Return a list of the sections in B, using sep as the delimiter.
+        If sep is not given, B is split on ASCII whitespace characters
+        (space, tab, return, newline, formfeed, vertical tab).
+        If maxsplit is given, at most maxsplit splits are done.
+        """
+
+    def splitlines():
+        """B.splitlines(keepends=False) -> list of lines
+
+        Return a list of the lines in B, breaking at line boundaries.
+        Line breaks are not included in the resulting list unless keepends
+        is given and true.
+        """
+
+    def startswith():
+        """B.startswith(prefix[, start[, end]]) -> bool
+
+        Return True if B starts with the specified prefix, False otherwise.
+        With optional start, test B beginning at that position.
+        With optional end, stop comparing B at that position.
+        prefix can also be a tuple of strings to try.
+        """
+
+    def strip():
+        """B.strip([bytes]) -> bytearray
+
+        Strip leading and trailing bytes contained in the argument
+        and return the result as a new bytearray.
+        If the argument is omitted, strip ASCII whitespace.
+        """
+
+    def swapcase():
+        """B.swapcase() -> copy of B
+
+        Return a copy of B with uppercase ASCII characters converted
+        to lowercase ASCII and vice versa.
+        """
+
+    def title():
+        """B.title() -> copy of B
+
+        Return a titlecased version of B, i.e. ASCII words start with uppercase
+        characters, all remaining cased characters have lowercase.
+        """
+
+    def translate():
+        """B.translate(table[, deletechars]) -> bytearray
+
+        Return a copy of B, where all characters occurring in the
+        optional argument deletechars are removed, and the remaining
+        characters have been mapped through the given translation
+        table, which must be a bytes object of length 256.
+        """
+
+    def upper():
+        """B.upper() -> copy of B
+
+        Return a copy of B with all ASCII characters converted to uppercase.
+        """
+
+    def zfill():
+        """B.zfill(width) -> copy of B
+
+        Pad a numeric string B with zeros on the left, to fill a field
+        of the specified width.  B is never truncated.
+        """
+
+
 W_BytearrayObject.typedef = StdTypeDef(
     "bytearray",
-    __doc__ = '''bytearray() -> an empty bytearray
-bytearray(sequence) -> bytearray initialized from sequence\'s items
-
-If the argument is a bytearray, the return value is the same object.''',
+    __doc__ = BytearrayDocstrings.__doc__,
     __new__ = interp2app(W_BytearrayObject.descr_new),
     __hash__ = None,
-    __reduce__ = interp2app(W_BytearrayObject.descr_reduce),
-    fromhex = interp2app(W_BytearrayObject.descr_fromhex, as_classmethod=True),
+    __reduce__ = interp2app(W_BytearrayObject.descr_reduce,
+                            doc=BytearrayDocstrings.__reduce__.__doc__),
+    fromhex = interp2app(W_BytearrayObject.descr_fromhex, as_classmethod=True,
+                         doc=BytearrayDocstrings.fromhex.__doc__),
 
-    __repr__ = interp2app(W_BytearrayObject.descr_repr),
-    __str__ = interp2app(W_BytearrayObject.descr_str),
+    __repr__ = interp2app(W_BytearrayObject.descr_repr,
+                          doc=BytearrayDocstrings.__repr__.__doc__),
+    __str__ = interp2app(W_BytearrayObject.descr_str,
+                         doc=BytearrayDocstrings.__str__.__doc__),
 
-    __eq__ = interp2app(W_BytearrayObject.descr_eq),
-    __ne__ = interp2app(W_BytearrayObject.descr_ne),
-    __lt__ = interp2app(W_BytearrayObject.descr_lt),
-    __le__ = interp2app(W_BytearrayObject.descr_le),
-    __gt__ = interp2app(W_BytearrayObject.descr_gt),
-    __ge__ = interp2app(W_BytearrayObject.descr_ge),
+    __eq__ = interp2app(W_BytearrayObject.descr_eq,
+                        doc=BytearrayDocstrings.__eq__.__doc__),
+    __ne__ = interp2app(W_BytearrayObject.descr_ne,
+                        doc=BytearrayDocstrings.__ne__.__doc__),
+    __lt__ = interp2app(W_BytearrayObject.descr_lt,
+                        doc=BytearrayDocstrings.__lt__.__doc__),
+    __le__ = interp2app(W_BytearrayObject.descr_le,
+                        doc=BytearrayDocstrings.__le__.__doc__),
+    __gt__ = interp2app(W_BytearrayObject.descr_gt,
+                        doc=BytearrayDocstrings.__gt__.__doc__),
+    __ge__ = interp2app(W_BytearrayObject.descr_ge,
+                        doc=BytearrayDocstrings.__ge__.__doc__),
 
-    __len__ = interp2app(W_BytearrayObject.descr_len),
-    __contains__ = interp2app(W_BytearrayObject.descr_contains),
+    __len__ = interp2app(W_BytearrayObject.descr_len,
+                         doc=BytearrayDocstrings.__len__.__doc__),
+    __contains__ = interp2app(W_BytearrayObject.descr_contains,
+                              doc=BytearrayDocstrings.__contains__.__doc__),
 
-    __add__ = interp2app(W_BytearrayObject.descr_add),
-    __mul__ = interp2app(W_BytearrayObject.descr_mul),
-    __rmul__ = interp2app(W_BytearrayObject.descr_mul),
+    __add__ = interp2app(W_BytearrayObject.descr_add,
+                         doc=BytearrayDocstrings.__add__.__doc__),
+    __mul__ = interp2app(W_BytearrayObject.descr_mul,
+                         doc=BytearrayDocstrings.__mul__.__doc__),
+    __rmul__ = interp2app(W_BytearrayObject.descr_mul,
+                          doc=BytearrayDocstrings.__rmul__.__doc__),
 
-    __getitem__ = interp2app(W_BytearrayObject.descr_getitem),
+    __getitem__ = interp2app(W_BytearrayObject.descr_getitem,
+                             doc=BytearrayDocstrings.__getitem__.__doc__),
 
-    capitalize = interp2app(W_BytearrayObject.descr_capitalize),
-    center = interp2app(W_BytearrayObject.descr_center),
-    count = interp2app(W_BytearrayObject.descr_count),
-    decode = interp2app(W_BytearrayObject.descr_decode),
-    expandtabs = interp2app(W_BytearrayObject.descr_expandtabs),
-    find = interp2app(W_BytearrayObject.descr_find),
-    rfind = interp2app(W_BytearrayObject.descr_rfind),
-    index = interp2app(W_BytearrayObject.descr_index),
-    rindex = interp2app(W_BytearrayObject.descr_rindex),
-    isalnum = interp2app(W_BytearrayObject.descr_isalnum),
-    isalpha = interp2app(W_BytearrayObject.descr_isalpha),
-    isdigit = interp2app(W_BytearrayObject.descr_isdigit),
-    islower = interp2app(W_BytearrayObject.descr_islower),
-    isspace = interp2app(W_BytearrayObject.descr_isspace),
-    istitle = interp2app(W_BytearrayObject.descr_istitle),
-    isupper = interp2app(W_BytearrayObject.descr_isupper),
-    join = interp2app(W_BytearrayObject.descr_join),
-    ljust = interp2app(W_BytearrayObject.descr_ljust),
-    rjust = interp2app(W_BytearrayObject.descr_rjust),
-    lower = interp2app(W_BytearrayObject.descr_lower),
-    partition = interp2app(W_BytearrayObject.descr_partition),
-    rpartition = interp2app(W_BytearrayObject.descr_rpartition),
-    replace = interp2app(W_BytearrayObject.descr_replace),
-    split = interp2app(W_BytearrayObject.descr_split),
-    rsplit = interp2app(W_BytearrayObject.descr_rsplit),
-    splitlines = interp2app(W_BytearrayObject.descr_splitlines),
-    startswith = interp2app(W_BytearrayObject.descr_startswith),
-    endswith = interp2app(W_BytearrayObject.descr_endswith),
-    strip = interp2app(W_BytearrayObject.descr_strip),
-    lstrip = interp2app(W_BytearrayObject.descr_lstrip),
-    rstrip = interp2app(W_BytearrayObject.descr_rstrip),
-    swapcase = interp2app(W_BytearrayObject.descr_swapcase),
-    title = interp2app(W_BytearrayObject.descr_title),
-    translate = interp2app(W_BytearrayObject.descr_translate),
-    upper = interp2app(W_BytearrayObject.descr_upper),
-    zfill = interp2app(W_BytearrayObject.descr_zfill),
+    capitalize = interp2app(W_BytearrayObject.descr_capitalize,
+                            doc=BytearrayDocstrings.capitalize.__doc__),
+    center = interp2app(W_BytearrayObject.descr_center,
+                        doc=BytearrayDocstrings.center.__doc__),
+    count = interp2app(W_BytearrayObject.descr_count,
+                       doc=BytearrayDocstrings.count.__doc__),
+    decode = interp2app(W_BytearrayObject.descr_decode,
+                        doc=BytearrayDocstrings.decode.__doc__),
+    expandtabs = interp2app(W_BytearrayObject.descr_expandtabs,
+                            doc=BytearrayDocstrings.expandtabs.__doc__),
+    find = interp2app(W_BytearrayObject.descr_find,
+                      doc=BytearrayDocstrings.find.__doc__),
+    rfind = interp2app(W_BytearrayObject.descr_rfind,
+                       doc=BytearrayDocstrings.rfind.__doc__),
+    index = interp2app(W_BytearrayObject.descr_index,
+                       doc=BytearrayDocstrings.index.__doc__),
+    rindex = interp2app(W_BytearrayObject.descr_rindex,
+                        doc=BytearrayDocstrings.rindex.__doc__),
+    isalnum = interp2app(W_BytearrayObject.descr_isalnum,
+                         doc=BytearrayDocstrings.isalnum.__doc__),
+    isalpha = interp2app(W_BytearrayObject.descr_isalpha,
+                         doc=BytearrayDocstrings.isalpha.__doc__),
+    isdigit = interp2app(W_BytearrayObject.descr_isdigit,
+                         doc=BytearrayDocstrings.isdigit.__doc__),
+    islower = interp2app(W_BytearrayObject.descr_islower,
+                         doc=BytearrayDocstrings.islower.__doc__),
+    isspace = interp2app(W_BytearrayObject.descr_isspace,
+                         doc=BytearrayDocstrings.isspace.__doc__),
+    istitle = interp2app(W_BytearrayObject.descr_istitle,
+                         doc=BytearrayDocstrings.istitle.__doc__),
+    isupper = interp2app(W_BytearrayObject.descr_isupper,
+                         doc=BytearrayDocstrings.isupper.__doc__),
+    join = interp2app(W_BytearrayObject.descr_join,
+                      doc=BytearrayDocstrings.join.__doc__),
+    ljust = interp2app(W_BytearrayObject.descr_ljust,
+                       doc=BytearrayDocstrings.ljust.__doc__),
+    rjust = interp2app(W_BytearrayObject.descr_rjust,
+                       doc=BytearrayDocstrings.rjust.__doc__),
+    lower = interp2app(W_BytearrayObject.descr_lower,
+                       doc=BytearrayDocstrings.lower.__doc__),
+    partition = interp2app(W_BytearrayObject.descr_partition,
+                           doc=BytearrayDocstrings.partition.__doc__),
+    rpartition = interp2app(W_BytearrayObject.descr_rpartition,
+                            doc=BytearrayDocstrings.rpartition.__doc__),
+    replace = interp2app(W_BytearrayObject.descr_replace,
+                         doc=BytearrayDocstrings.replace.__doc__),
+    split = interp2app(W_BytearrayObject.descr_split,
+                       doc=BytearrayDocstrings.split.__doc__),
+    rsplit = interp2app(W_BytearrayObject.descr_rsplit,
+                        doc=BytearrayDocstrings.rsplit.__doc__),
+    splitlines = interp2app(W_BytearrayObject.descr_splitlines,
+                            doc=BytearrayDocstrings.splitlines.__doc__),
+    startswith = interp2app(W_BytearrayObject.descr_startswith,
+                            doc=BytearrayDocstrings.startswith.__doc__),
+    endswith = interp2app(W_BytearrayObject.descr_endswith,
+                          doc=BytearrayDocstrings.endswith.__doc__),
+    strip = interp2app(W_BytearrayObject.descr_strip,
+                       doc=BytearrayDocstrings.strip.__doc__),
+    lstrip = interp2app(W_BytearrayObject.descr_lstrip,
+                        doc=BytearrayDocstrings.lstrip.__doc__),
+    rstrip = interp2app(W_BytearrayObject.descr_rstrip,
+                        doc=BytearrayDocstrings.rstrip.__doc__),
+    swapcase = interp2app(W_BytearrayObject.descr_swapcase,
+                          doc=BytearrayDocstrings.swapcase.__doc__),
+    title = interp2app(W_BytearrayObject.descr_title,
+                       doc=BytearrayDocstrings.title.__doc__),
+    translate = interp2app(W_BytearrayObject.descr_translate,
+                           doc=BytearrayDocstrings.translate.__doc__),
+    upper = interp2app(W_BytearrayObject.descr_upper,
+                       doc=BytearrayDocstrings.upper.__doc__),
+    zfill = interp2app(W_BytearrayObject.descr_zfill,
+                       doc=BytearrayDocstrings.zfill.__doc__),
 
-    __init__ = interp2app(W_BytearrayObject.descr_init),
+    __init__ = interp2app(W_BytearrayObject.descr_init,
+                          doc=BytearrayDocstrings.__init__.__doc__),
     __buffer__ = interp2app(W_BytearrayObject.descr_buffer),
 
-    __iadd__ = interp2app(W_BytearrayObject.descr_inplace_add),
-    __imul__ = interp2app(W_BytearrayObject.descr_inplace_mul),
-    __setitem__ = interp2app(W_BytearrayObject.descr_setitem),
-    __delitem__ = interp2app(W_BytearrayObject.descr_delitem),
+    __iadd__ = interp2app(W_BytearrayObject.descr_inplace_add,
+                          doc=BytearrayDocstrings.__iadd__.__doc__),
+    __imul__ = interp2app(W_BytearrayObject.descr_inplace_mul,
+                          doc=BytearrayDocstrings.__imul__.__doc__),
+    __setitem__ = interp2app(W_BytearrayObject.descr_setitem,
+                             doc=BytearrayDocstrings.__setitem__.__doc__),
+    __delitem__ = interp2app(W_BytearrayObject.descr_delitem,
+                             doc=BytearrayDocstrings.__delitem__.__doc__),
 
-    append = interp2app(W_BytearrayObject.descr_append),
-    extend = interp2app(W_BytearrayObject.descr_extend),
-    insert = interp2app(W_BytearrayObject.descr_insert),
-    pop = interp2app(W_BytearrayObject.descr_pop),
-    remove = interp2app(W_BytearrayObject.descr_remove),
-    reverse = interp2app(W_BytearrayObject.descr_reverse),
+    append = interp2app(W_BytearrayObject.descr_append,
+                        doc=BytearrayDocstrings.append.__doc__),
+    extend = interp2app(W_BytearrayObject.descr_extend,
+                        doc=BytearrayDocstrings.extend.__doc__),
+    insert = interp2app(W_BytearrayObject.descr_insert,
+                        doc=BytearrayDocstrings.insert.__doc__),
+    pop = interp2app(W_BytearrayObject.descr_pop,
+                     doc=BytearrayDocstrings.pop.__doc__),
+    remove = interp2app(W_BytearrayObject.descr_remove,
+                        doc=BytearrayDocstrings.remove.__doc__),
+    reverse = interp2app(W_BytearrayObject.descr_reverse,
+                         doc=BytearrayDocstrings.reverse.__doc__),
 )
 
 init_signature = Signature(['source', 'encoding', 'errors'], None, None)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to