Skip to content

Commit d89e5d6

Browse files
committed
Regenerate docstrings and include memoryview
1 parent 37acf7e commit d89e5d6

3 files changed

Lines changed: 116 additions & 1 deletion

File tree

Misc/make_pydocs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class C:
6262
BaseException,
6363
bytearray,
6464
#buffer,
65+
memoryview,
6566
# +
6667
type(f),
6768
type(m),

src/org/python/core/BuiltinDocs.java

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4047,6 +4047,119 @@ public class BuiltinDocs {
40474047
"Pad a numeric string B with zeros on the left, to fill a field\n" +
40484048
"of the specified width. B is never truncated.";
40494049

4050+
// Docs for <type 'memoryview'>
4051+
public final static String memoryview___class___doc =
4052+
"type(object) -> the object's type\n" +
4053+
"type(name, bases, dict) -> a new type";
4054+
4055+
public final static String memoryview___delattr___doc =
4056+
"x.__delattr__('name') <==> del x.name";
4057+
4058+
public final static String memoryview___delitem___doc =
4059+
"x.__delitem__(y) <==> del x[y]";
4060+
4061+
public final static String memoryview_doc =
4062+
"memoryview(object)\n" +
4063+
"\n" +
4064+
"Create a new memoryview object which references the given object.";
4065+
4066+
public final static String memoryview___eq___doc =
4067+
"x.__eq__(y) <==> x==y";
4068+
4069+
public final static String memoryview___format___doc =
4070+
"default object formatter";
4071+
4072+
public final static String memoryview___ge___doc =
4073+
"x.__ge__(y) <==> x>=y";
4074+
4075+
public final static String memoryview___getattribute___doc =
4076+
"x.__getattribute__('name') <==> x.name";
4077+
4078+
public final static String memoryview___getitem___doc =
4079+
"x.__getitem__(y) <==> x[y]";
4080+
4081+
public final static String memoryview___gt___doc =
4082+
"x.__gt__(y) <==> x>y";
4083+
4084+
public final static String memoryview___hash___doc =
4085+
"x.__hash__() <==> hash(x)";
4086+
4087+
public final static String memoryview___init___doc =
4088+
"x.__init__(...) initializes x; see help(type(x)) for signature";
4089+
4090+
public final static String memoryview___le___doc =
4091+
"x.__le__(y) <==> x<=y";
4092+
4093+
public final static String memoryview___len___doc =
4094+
"x.__len__() <==> len(x)";
4095+
4096+
public final static String memoryview___lt___doc =
4097+
"x.__lt__(y) <==> x<y";
4098+
4099+
public final static String memoryview___ne___doc =
4100+
"x.__ne__(y) <==> x!=y";
4101+
4102+
public final static String memoryview___new___doc =
4103+
"T.__new__(S, ...) -> a new object with type S, a subtype of T";
4104+
4105+
public final static String memoryview___reduce___doc =
4106+
"helper for pickle";
4107+
4108+
public final static String memoryview___reduce_ex___doc =
4109+
"helper for pickle";
4110+
4111+
public final static String memoryview___repr___doc =
4112+
"x.__repr__() <==> repr(x)";
4113+
4114+
public final static String memoryview___setattr___doc =
4115+
"x.__setattr__('name', value) <==> x.name = value";
4116+
4117+
public final static String memoryview___setitem___doc =
4118+
"x.__setitem__(i, y) <==> x[i]=y";
4119+
4120+
public final static String memoryview___sizeof___doc =
4121+
"__sizeof__() -> int\n" +
4122+
"size of object in memory, in bytes";
4123+
4124+
public final static String memoryview___str___doc =
4125+
"x.__str__() <==> str(x)";
4126+
4127+
public final static String memoryview___subclasshook___doc =
4128+
"Abstract classes can override this to customize issubclass().\n" +
4129+
"\n" +
4130+
"This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" +
4131+
"It should return True, False or NotImplemented. If it returns\n" +
4132+
"NotImplemented, the normal algorithm is used. Otherwise, it\n" +
4133+
"overrides the normal algorithm (and the outcome is cached).\n" +
4134+
"";
4135+
4136+
public final static String memoryview_format_doc =
4137+
"";
4138+
4139+
public final static String memoryview_itemsize_doc =
4140+
"";
4141+
4142+
public final static String memoryview_ndim_doc =
4143+
"";
4144+
4145+
public final static String memoryview_readonly_doc =
4146+
"";
4147+
4148+
public final static String memoryview_shape_doc =
4149+
"";
4150+
4151+
public final static String memoryview_strides_doc =
4152+
"";
4153+
4154+
public final static String memoryview_suboffsets_doc =
4155+
"";
4156+
4157+
public final static String memoryview_tobytes_doc =
4158+
"";
4159+
4160+
public final static String memoryview_tolist_doc =
4161+
"";
4162+
40504163
// Docs for <type 'function'>
40514164
public final static String function___call___doc =
40524165
"x.__call__(...) <==> x(...)";

src/org/python/core/PyMemoryView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* provides a wrapper around the Jython buffer API, but slice operations and most others are
1313
* missing.
1414
*/
15-
@ExposedType(name = "memoryview", base = PyObject.class, isBaseType = false)
15+
@ExposedType(name = "memoryview", doc = BuiltinDocs.memoryview_doc, base = PyObject.class,
16+
isBaseType = false)
1617
public class PyMemoryView extends PySequence implements BufferProtocol {
1718

1819
public static final PyType TYPE = PyType.fromClass(PyMemoryView.class);

0 commit comments

Comments
 (0)