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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
f5998c80
Commit
f5998c80
authored
Jun 14, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the compiled switch code snippet to the examples directory for testing.
parent
5fadf79e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
docs/examples/tutorial/pure/compiled_switch.py
docs/examples/tutorial/pure/compiled_switch.py
+6
-0
docs/src/tutorial/pure.rst
docs/src/tutorial/pure.rst
+1
-6
No files found.
docs/examples/tutorial/pure/compiled_switch.py
0 → 100644
View file @
f5998c80
import
cython
if
cython
.
compiled
:
print
(
"Yep, I'm compiled."
)
else
:
print
(
"Just a lowly interpreted script."
)
docs/src/tutorial/pure.rst
View file @
f5998c80
...
...
@@ -141,12 +141,7 @@ modules when Cython is not installed.
* ``compiled`` is a special variable which is set to ``True`` when the compiler
runs, and ``False`` in the interpreter. Thus, the code
::
if cython.compiled:
print("Yep, I'm compiled.")
else:
print("Just a lowly interpreted script.")
.. literalinclude:: ../../examples/tutorial/pure/compiled_switch.py
will behave differently depending on whether or not the code is executed as a
compiled extension (:file:`.so`/:file:`.pyd`) module or a plain :file:`.py`
...
...
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