PEP 505 – None-aware operators (2015)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • proposal-optional-chaining

  • For comparison, here are the Javascript RFCs for the equivalent operators:

    https://github.com/TC39/proposal-optional-chaining

    https://github.com/tc39/proposal-nullish-coalescing

    IMO optional chaining is a lifesaver when dealing with deeply nested JSON, and it's become indispensable in our Typescript code. But we also deal with JSON from various third-party endpoints in Python, and far too often we resort to an inefficient deep_get utility to make our code sensical.

    > if json?.get("foo")?.get("bar")?[0]?.get("baz")

    may seem messy but would be infinitely better than the fragile (note the nested list-of-a-single-dict, and how bugs can appear if it's not there):

    > if json.get("foo", {}).get("bar", [{}])[0].get("baz")

    or the inefficient

    > if deep_get(json, "foo.bar.0.baz")

    It's not nearly as good as the Typescript json.foo?.bar?.[0]?.baz - but it's good enough!

  • proposal-nullish-coalescing

    Discontinued Nullish coalescing proposal x ?? y

  • For comparison, here are the Javascript RFCs for the equivalent operators:

    https://github.com/TC39/proposal-optional-chaining

    https://github.com/tc39/proposal-nullish-coalescing

    IMO optional chaining is a lifesaver when dealing with deeply nested JSON, and it's become indispensable in our Typescript code. But we also deal with JSON from various third-party endpoints in Python, and far too often we resort to an inefficient deep_get utility to make our code sensical.

    > if json?.get("foo")?.get("bar")?[0]?.get("baz")

    may seem messy but would be infinitely better than the fragile (note the nested list-of-a-single-dict, and how bugs can appear if it's not there):

    > if json.get("foo", {}).get("bar", [{}])[0].get("baz")

    or the inefficient

    > if deep_get(json, "foo.bar.0.baz")

    It's not nearly as good as the Typescript json.foo?.bar?.[0]?.baz - but it's good enough!

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Welcome to Perfect Media Server

    1 project | news.ycombinator.com | 14 May 2024
  • MacRelix – Unix-like features for classic Mac OS

    4 projects | news.ycombinator.com | 12 May 2024
  • Spotify Rick Roll

    1 project | dev.to | 13 May 2024
  • Make a smart button! 😀 using plain HTML5 + Tailwind CSS button with proper hover effects and transitions

    1 project | dev.to | 13 May 2024
  • Testing in Angular: Replace Karma to Web Test Runner

    1 project | dev.to | 13 May 2024