4 ms·
I think the parent comment is referring to how you can do e.g., `let {x, y, z} = point` (JS, object/dictionary) or `let Point {x, y, z} = point} (Rust, struct)
by bobbylarrybobby 4y ago
I think the parent comment is referring to how you can do e.g., `let {x, y, z} = point` (JS, object/dictionary) or `let Point {x, y, z} = point} (Rust, struct) but in Python your only option is `x = point.x; y = point["y"]` etc
- BiteCode_dev 4y agoIndeed. Now you can do: import operator foo, bar, baz = operator.itemgetter('foo', 'bar', 'baz')(mapping) But it's verbose, inelegant, and doesn't handle missing values.
- bmitc 4y agoI misread their first sentence. I see now that they’re lamenting what I mentioned not being in Python. I was thinking they meant in general and not just in Python.