Lol. Not that surprised since Stripe's backend is basically still Ruby on Rails. Probably a Ruby engineer that wrote the article, writing Python for the first time in a while.
I botched the copy pasta of the embedded code snippet container. All fixed up!