Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
038af452
Commit
038af452
authored
May 16, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All text is now replaced by links to the userguide.
parent
6ffbfc5e
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
699 deletions
+46
-699
docs/src/reference/language_basics.rst
docs/src/reference/language_basics.rst
+22
-698
docs/src/userguide/language_basics.rst
docs/src/userguide/language_basics.rst
+24
-1
No files found.
docs/src/reference/language_basics.rst
View file @
038af452
This diff is collapsed.
Click to expand it.
docs/src/userguide/language_basics.rst
View file @
038af452
...
...
@@ -11,6 +11,7 @@
Language Basics
*****************
.. _declaring_data_types:
Declaring Data Types
====================
...
...
@@ -38,6 +39,8 @@ the use of ‘early binding’ programming techniques.
check that the type of some object matches the declared type.
.. _c_variable_and_type_definitions:
C variable and type definitions
===============================
...
...
@@ -135,6 +138,9 @@ Here is a simple example::
You can read more about them in :ref:`extension-types`.
.. _types:
Types
-----
...
...
@@ -199,7 +205,8 @@ can group them into a :keyword:`cdef` block like this::
void f(Spam *s):
print s.tons, "Tons of spam"
.. _cpdef:
.. _cdef:
.. _python_functions_vs_c_functions:
Python functions vs. C functions
...
...
@@ -302,6 +309,8 @@ In the interests of clarity, it is probably a good idea to always be explicit
about object parameters in C functions.
.. _optional_arguments:
Optional Arguments
------------------
...
...
@@ -351,6 +360,8 @@ There may be a slight performance penalty when the optional arg is overridden
with one that does not have default values.
.. _keyword_only_argument:
Keyword-only Arguments
----------------------
...
...
@@ -380,6 +391,7 @@ terminate the list of positional arguments::
Shown above, the signature takes exactly two positional
parameters and has two required keyword parameters
.. _error_return_values:
Error return values
-------------------
...
...
@@ -453,6 +465,9 @@ Some things to note:
return type implicitly returns a Python object. (Exceptions on such functions
are implicitly propagated by returning NULL.)
.. _checking_return_values_of_non_cython_functions:
Checking return values of non-Cython functions
----------------------------------------------
...
...
@@ -474,6 +489,7 @@ return value and raise it yourself, for example,::
if p == NULL:
raise SpamError("Couldn't open the spam file")
.. _overriding_in_extension_types:
Overriding in extension types
-----------------------------
...
...
@@ -595,6 +611,7 @@ Sometimes Cython will complain unnecessarily, and sometimes it will fail to
detect a problem that exists. Ultimately, you need to understand the issue and
be careful what you do.
.. _type_casting:
Type Casting
------------
...
...
@@ -642,6 +659,8 @@ Here is an example::
The precedence of ``<...>`` is such that ``<type>a.b.c`` is interpreted as ``<type>(a.b.c)``.
.. _checked_type_casts:
Checked Type Casts
------------------
...
...
@@ -654,6 +673,7 @@ if ``x`` is not an instance of ``MyExtensionType``.
This tests for the exact class for builtin types,
but allows subclasses for :ref:`extension-types`.
.. _statements_and_expressions:
Statements and expressions
==========================
...
...
@@ -701,6 +721,7 @@ variable residing in the scope where it is assigned. The type of the variable
depends on type inference, except for the global module scope, where it is
always a Python object.
.. _built_in_functions:
Built-in Functions
------------------
...
...
@@ -811,6 +832,7 @@ Some things to note about the for-from loop:
Like other Python looping statements, break and continue may be used in the
body, and the loop may have an else clause.
.. _cython_file_types:
Cython file types
=================
...
...
@@ -909,6 +931,7 @@ of functions or class bodies.
separate parts that may be more appropriate in many cases. See
:ref:`sharing-declarations`.
.. _conditional_compilation:
Conditional Compilation
=======================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment