-
Notifications
You must be signed in to change notification settings - Fork 1
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
Questions/Notes #2
Comments
Hi, thanks for your interest! Would be fun to have someone to join me in this craziness. :) These are good points and questions.
|
Seems like
3.12 is fine with me, just wanted to know the targeted version so I know what syntax and feature stuff to work with. I figured at least 3.10 since I saw a use of match-case. Perhaps eventually, the configuration toml can contain a field for a target Python version, but then multiple generators may need to exist for the slight differences between version, unless its decided to just ignore new syntax stuff (like ignoring 3.12's |
I had a feeling it might be related to discards, but I couldn't figure out why it would be necessary. Turns out it's because I punted on types. The current generated Python doesn't have type function arguments, so discards are just a variable with a Once we get to typing functions it would probably need to be |
Hey there! This project seems neat, and I would like to contribute.
I have a note and two questions for now on the Priorities listed:
This should be possible as a
typing.Callable
field, just need to generate one of these:Perhaps for whether it's a def or a lambda, follow the convention that's used in the Gleam code: pub function if named/defined, lambda if anonymous. Of course, a major downside for the lambda approach is that you can't annotate types on it directly, but at least the dataclass field's Callable annotation should have that covered.
Is this meant like a catch-all type? Or a variable-type annotation like
foo :: a -> a
? Or something along the lines of a Typed-Hole? Maybe context around where this came from might help in figuring out what (if anything) needs be done.Last, is there anything in place right now to determine the python version being targeted, or is it only targeting one version at the moment? (Like if 3.12 is being generated, the generated code could use the new
type
keyword syntax, but 3.11 would have to rely ontyping.TypeAlias
)The text was updated successfully, but these errors were encountered: