Skip to content

Instantly share code, notes, and snippets.

@ofelix03
Last active April 17, 2021 03:03
Show Gist options
  • Select an option

  • Save ofelix03/f71b2253b1aee9cbfa78458a1eab052b to your computer and use it in GitHub Desktop.

Select an option

Save ofelix03/f71b2253b1aee9cbfa78458a1eab052b to your computer and use it in GitHub Desktop.
if-checks-on-truthy-values-better
invoice = Invoice(amount=2000,
invoice_date='2021-04-30',
customer=' Toyota Motor Corporation',
number='INV-20001')
if invoice.is_due:
# invoice id due, send a followup report to customer
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment