1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
Pydoc writer codemarkups
========================
literals
--------
Literal are recognized by a text specific markup.py
informational units
-------------------
these are markups to allow index creation.
::
\begin{datadesc} {name}
\begin{datadescni} {name}
\begin{excdesc} {name}
\begin{classdesc*} {name}
\begin{csimplemacrodesc} {name}
.. topic:: ctype with_tag and_name
:class: ctypedesc
bla bla
::
\begin{ctypedesc} [tag]{name}
\begin{memberdesc} [type name]{name}
\begin{memberdescni} [type name]{name}
.. topic:: sizeof(type_or_object)
:class: funcdesc
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
::
\begin{cvardesc} {type}{name}
\begin{excclassdesc} {name}{constructor parameters}
\begin{funcdesc} {name}{parameters}
\begin{funcdescni} {name}{parameters}
\begin{methoddesc} [type name]{name}{parameters}
\begin{methoddescni} [type name]{name}{parameters}
\begin{cmemberdesc} {container}{type}{name}
\begin{classdesc} {name}{constructor parameters}
\begin{cfuncdesc} {type}{name}{args}
definition lists
''''''''''''''''
with classifier ::
sizeof(type_or_object) : funcdesc
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
plain definitions are set as datadescni, maybe latex description would
be better ::
standalone :
is marked as datadescni
test samples
''''''''''''
standalone :
is marked as datadescni
which :
might be a not so optimal solution.
Real informational units
Class : classdesc*
without constructor documentation.
sizeof(type_or_object) : funcdesc
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
a function with optional parameter
create_string_buffer(init[, size]) : funcdesc
does this or that
file : datadesc
also datadescni, excdesc, classdesc*, csimplemacrodesc
FileRO : ctypedesc
without tag
ftag FileRW : ctypedesc
with tag
also memberdesc, memberdescni
read(int bytes [, bool flush [, bool after]]) : funcdescni
two optional parameter.
also cvardesc, funcdesc, funcdescni, classdesc, excclassdesc
force_it(string s) : methoddesc
without return type
bool write(string s) : methoddescni
with return type
int read(File) : cfuncdesc
not a tag but a type
PyTypeObject long tp_flags : cmemberdesc
This field is a bit mask of various flags. Some flags indicate
variant semantics for certain situations; others are used to
extra markup to the definition does not change anything as the writer processes
only the text version.
``sizeof(type_or_object)`` : funcdesc
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
``from_address(address)`` : methoddesc
This method returns a ctypes type instance using the memory
specified by address.
alternatives
''''''''''''
* customroles ::
.. role:: funcdesc
:funcdesc:`sizeof(type_or_object)`
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
But the block after funcdesc should be inside funcdesc not in a separate
block quote.
* admonitions :
Have a text block and a title. ::
.. admonition:: sizeof(type_or_object)
:class: funcdesc
Returns the size in bytes of a ctypes type or instance memory
buffer. Does the same as the C sizeof() function.
* directives
see sandbox/edloper/docpy/asyncore.rst.
* topics
Have a text block and a title::
.. topic:: c_char
:class: datadesc
the ...
|