Conversation
|
As someone who doesn't really understand what I wonder if it might be a good idea to start by adding clear documentation about the difference between |
|
@pganssle I'm convinced that this is a better name and, in combination with more documentation, it will make more sense than For short, the new name means that from typing import List, Any
def foo(x: List, y: Any):
...translates into fn foo(x: &PyList, y: &PyAny) {
unimplemented!()
} |
It should be replaced by
I like the idea, but that should be discussed separately. |
|
I'd say we wait a bit before merging so everyone has time to add comments. Oh, and @kngwyu could you please add a changelog entry? |
Yes, this is is a nice parallel, but this is very specific to the Python I haven't looked into this closely, but it may be worth considering other parts of the type system to see if the parallels break down. or if they hold up. What about I think in the end you should only adopt this |
|
As I've said in the issue thread,
I don't want to base pyo3 on typing, I just want to use the resemblance to make it easier understandable (I'd also say that "any" makes sense even without |
|
@pganssle So while renaming |
See #356 (comment) and around comments for the motivation.
Some related ideas:
FromPyObjectrather than renaming it? This trait remains unchanged and doesn't fit to our semanticsPyTryFromwithPyDowncast?