Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 16
    Please leave a comment if you're going to down vote something like this! This is a valid answer. If you aren't fan of Cython perhaps you can say why? Note that I pointed out that has drawbacks. It is also one of the more secure routes to go, however, and is even recommend by some standard libraries e.g. the PyInstaller docs for dealing with this concern! Commented Sep 7, 2019 at 0:56
  • 6
    More information about what is present in the compiled binary: Are executables produced with Cython really free of the source code?. Commented Jun 15, 2020 at 13:40
  • 4
    Most of the limitations you mention aren't really correct - there's extra syntax that adds statically typing (mainly for speed) but most normal Python programs should run unaltered, including keyword parameters, conditional imports, eval, polymorphism. There's definitely bits of incompatibility (mostly to do with introspection) but all of the stuff you mentioned should work (and should have worked in 2018 too) Commented Dec 26, 2020 at 22:12
  • 1
    Oh yeah? Cool! I will have to dig deeper into this. Can you recommend any notable sources for documentation, examples, etc? Commented Dec 27, 2020 at 22:12
  • 1
    I'd like to step through some of these one-by-one. First the keyword arguments. The official documentation that I see on this is cython.readthedocs.io/en/latest/src/userguide/…. It appears that to use kw args a function definition must have "A single "*" without argument name can be used to terminate the list of positional arguments". If so, that means it's possible to use them, but only after making code revisions, right? Commented Dec 28, 2020 at 15:21