-
Notifications
You must be signed in to change notification settings - Fork 301
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
[Python] '<' not supported between instances of 'dict' and 'dict' #3869
Comments
hmm, after some further research I can see that the problem only happens with anonymous records in keys |
For reference, are you saying that there is a bug when doing something like this? let myMap =
Map.ofList [
{| Key = "1"|}, "Value 1"
{| Key = "2"|}, "Value 2"
]
let value1 = Map.tryFind {| Key = "1"|} myMap |
I cannot reproduce so it would be great with a minimal repro. I also cannot make that example fail @MangelMaxime. Does it fail on your machine? This might be related to #3771 |
@dbrattli I didn't try my example. My goal was to confirm with @PawelStadnicki if this was the code that caused problem to him. My message was unclear sorry. @PawelStadnicki Could you please provide a reproduction code? |
Description
Code that uses Map.tryFind compiles fine to Python, but I'm getting
'<' not supported between instances of 'dict' and 'dict'
when running.My python version is 3.12.4.
I found that "In Python 3, dictionaries are no longer orderable together with many other types"
I can see a lot of tests in the repo for the Map module but the keys are pretty much plain numbers there and I have DU's.
Does it mean I cannot use complex types as keys? The same code works fine when compiled to js.
Related information
The text was updated successfully, but these errors were encountered: