exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
15.01k stars 517 forks source link

Support input() function #451

Closed knogu closed 1 month ago

knogu commented 1 year ago

It is important that Codon supports as many Python's features as possible. But input() has yet to be implemented in Codon. So I made this PR to add it. input() in Python: https://docs.python.org/3/library/functions.html#input

in develop branch (before merging this PR):

$ cat input.codon
print(input())
$ codon run input.codon
input.codon:1:7-12: error: name 'input' is not defined

in the branch for this PR, it works as well as Python (test right under the command is manually input)

$ codon run input.codon
test
test

Closes #96

cla-bot[bot] commented 1 year ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kotaro Noguchi. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
arshajii commented 1 month ago

This is finally added here: https://github.com/exaloop/codon/commit/5e2d04188ebadb06a8d2d36822f7d0f414d99571