jovenlin0527
jovenlin0527
This is my attempt at allowing a `PyClass` to hold a reference to another `PyClass`. I think it is safe, but not sure if it has other issues. https://gist.github.com/b05902132/de18debe9039473aa9b0bed6b48436c8 As...
Someone mentioned this issue on Gitter. https://bugs.python.org/issue15870 It seems that metaclass is not officially supported in C extensions.
Sure, but I am still working on fieldless enums (#2013). I think you can work on pattern matching for tuple struct before #2013 is done to avoid conflicted implementation. (It's...
I'm also new to this project, and not very familiar with the codebase, but I'll try: The details of Python pattern matching is described in [PEP634](https://www.python.org/dev/peps/pep-0634/). I think you may...
@errantsky My branch depends on #2014, and as a part of merging that PR, I'm afraid I will have to rebase my branch. I hope you didn't start any work...
I don't think we need `__match_args__` for regular `struct`s. We can simply match against attribute names. That's how Python matches `dataclass` in [PEP636](https://www.python.org/dev/peps/pep-0636/#appendix-a-quick-intro): ``` from dataclasses import dataclass @dataclass class...
We do, however, need to support tuple structs. In Rust we match them by: ```Rust struct Point(i32, i32); match point { Point(x, y) => ... } ``` Therefore I think...
Python introduced a new pattern matching syntax in 3.10, and I think if we can make Rust enum support that, this will be as close to ADT as we can...
> > If each variant has a corresponding PyClass, then we need a way to implicitly convert that class back to the enum. We could do this by implementing FromPyObject...