Jukka Lehtosalo
Jukka Lehtosalo
Great, let's get this merged! I'd like to play around with this a little before merging, since this kind of a big change, but don't wait for me if I...
To support e.g. 3.6 only as a compilation target (but not for running mypy/mypyc), it would be helpful if we'd document how to compile libraries targeting an older Python version...
Mypy considers the second list comprehension unreachable, and it doesn't export type information for it. The simplest fix here would probably be to fall back to `Any` (or `object`) types...
This is a good idea. I think that we want to support subclasses of dict properly, since they are pretty common. We can perhaps assume that `str` subclasses don't override...
More ideas (these are unprioritized): - [x] Add `bytes` primitive type (should also allow `bytearray`) - [x] `bytes` concatenation - [x] `bytes` indexing - [ ] `bytes` comparisons - [x]...
These `str` and `bytes` methods could be useful to specialize for specific literal arguments: - [x] `s.encode("ascii")` (for `str`) PyUnicode_AsEncodedString / PyUnicode_AsASCIIString - [x] `s.encode("utf-8")` (for `str`) PyUnicode_AsEncodedString / PyUnicode_AsUTF8String...
These operations may also be worth special casing: - [x] `int(string)` - [x] `str(int)`
I changed the lists to task lists, so that it's easier to track current progress.
Implementing some new primitives is a good way to get started for new contributors. Look at `mypyc/primitives` for how primitives are defined. (Note that we are in the process of...
Here are a few more which would be useful if we can make them faster: - [ ] List equality - [ ] Variable-length tuple equality