4 ms·
This is what i liked most working a bit in JS. How you can deconstruct, even in the function definition!!! Using {}. Why did they have to use that for sets in p
by lysecret 4y ago
This is what i liked most working a bit in JS. How you can deconstruct, even in the function definition!!! Using {}. Why did they have to use that for sets in python ahhh.
Also using ? For attributes that might be there and being able to chain that is sooo awesome.
These two things make for example working with nested Json in JS so much better than in Python.
- BiteCode_dev 4y agoThe ? attribute would indeed be a welcome addition, but not to work in the same way as in JS. In JS, it ignore null values. That wouldn't work in python. We would need a ? to says "ignore AttributeError, IndexError and KeyError on that access". However, the use of {} for set is not a problem. First, remember than Python is much, much older than JS. Insight is 20/20. Second, you could always use a different syntax.