Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement positional-only arguments #14

Merged
merged 6 commits into from
May 9, 2022

Conversation

youknowone
Copy link
Contributor

https://peps.python.org/pep-0570/

I know Violet is targeting Python 3.7 for now, but this is required to catch up the upper version later.

@LiarPrincess
Copy link
Owner

Ooo… nice!

I will go through this over the next few days. We just finished long weekend in Poland (1st and 3rd were national holidays) and things have piled up. I will also respond on the Swift forum.

@youknowone
Copy link
Contributor Author

I wish you had a nice holiday!

@LiarPrincess
Copy link
Owner

Finished the review and for me it is ready for merge.

My changes:

  • ran make elsa - this updates AST definition. Some comment has changed.
  • ran make gen - I explained this on Swift forum, but long story short: swift does not have macros, decorators or annotations. However, there is an external tool for this: Sourcery. So, basically: if you create/change some sourcery annotation then you have to run make gen to update generated files.
  • added tests for parser and compiler.

@LiarPrincess
Copy link
Owner

Can I merge or there is something more to do?

@youknowone
Copy link
Contributor Author

wow, I didn't know I missed these many things. putting make elsa, make gen and checking diff to CI will be helpful for consistency.

@LiarPrincess
Copy link
Owner

You only missed make gen.

I wrote unit tests by hand, because I like be able to put a breakpoint and stop there in a few seconds (I once worked on a project in which the time between writing code and debugging was measured in minutes…). In general, I to try to exercise at least the main path, so that I know the runtime actually can get there. But unit tests are a 'bonus' feature.

And, yes I really need to work on the CI thing for Violet. Putting make elsa and make gen there is a nice idea. Though the main objective now is garbage collection.

@LiarPrincess LiarPrincess merged commit dcff6aa into LiarPrincess:main May 9, 2022
@youknowone youknowone deleted the posonly-args branch May 24, 2022 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants