[pypy-commit] pypy py3k: (chronitis) update std.__doc__ and bytes.__doc__.
amauryfa
noreply at buildbot.pypy.org
Mon Nov 7 21:22:42 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48881:29d1700d2efd
Date: 2011-11-07 21:20 +0100
http://bitbucket.org/pypy/pypy/changeset/29d1700d2efd/
Log: (chronitis) update std.__doc__ and bytes.__doc__.
diff --git a/pypy/objspace/std/stringtype.py b/pypy/objspace/std/stringtype.py
--- a/pypy/objspace/std/stringtype.py
+++ b/pypy/objspace/std/stringtype.py
@@ -369,10 +369,15 @@
str_typedef = StdTypeDef("bytes",
__new__ = gateway.interp2app(descr__new__),
- __doc__ = '''str(object) -> string
-
-Return a nice string representation of the object.
-If the argument is a string, the return value is the same object.''',
+ __doc__ = 'bytes(iterable_of_ints) -> bytes\n'
+ 'bytes(string, encoding[, errors]) -> bytes\n'
+ 'bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n'
+ 'bytes(memory_view) -> bytes\n\n'
+ 'Construct an immutable array of bytes from:\n'
+ ' - an iterable yielding integers in range(256)\n'
+ ' - a text string encoded using the specified encoding\n'
+ ' - a bytes or a buffer object\n'
+ ' - any object implementing the buffer API.',
fromhex = gateway.interp2app(descr_fromhex, as_classmethod=True)
)
diff --git a/pypy/objspace/std/unicodetype.py b/pypy/objspace/std/unicodetype.py
--- a/pypy/objspace/std/unicodetype.py
+++ b/pypy/objspace/std/unicodetype.py
@@ -340,7 +340,7 @@
unicode_typedef = StdTypeDef("str",
__new__ = gateway.interp2app(descr_new_),
- __doc__ = '''unicode(string [, encoding[, errors]]) -> object
+ __doc__ = '''str(string [, encoding[, errors]]) -> object
Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
More information about the pypy-commit
mailing list