diff options
author | 0dminnimda <0dminnimda@gmail.com> | 2021-07-20 23:27:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 22:27:23 +0200 |
commit | c47742190b3614789b3c16c439764e05a630bca6 (patch) | |
tree | c8557aa579c72267c57763c62b045d7f564bb69c | |
parent | d833d432e56937f488d2d1f8b9f5ca8eebed4a21 (diff) | |
download | cython-c47742190b3614789b3c16c439764e05a630bca6.tar.gz |
Document `typeof` in pure.rst (GH-4301)
-rw-r--r-- | docs/src/tutorial/pure.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/src/tutorial/pure.rst b/docs/src/tutorial/pure.rst index 86e62a9d3..f31821d1f 100644 --- a/docs/src/tutorial/pure.rst +++ b/docs/src/tutorial/pure.rst @@ -243,6 +243,13 @@ Further Cython functions and declarations print(cython.sizeof(cython.longlong)) print(cython.sizeof(n)) +* ``typeof`` returns a string representation of the argument's type for debugging purposes. It can take expressions. + + :: + + cython.declare(n=cython.longlong) + print(cython.typeof(n)) + * ``struct`` can be used to create struct types.:: MyStruct = cython.struct(x=cython.int, y=cython.int, data=cython.double) |