Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 1 year ago

Don't return named tuples in new APIs

snarky.ca

external-link
message-square
0
link
fedilink
2
external-link

Don't return named tuples in new APIs

snarky.ca

RSS BotMB to Lobste.rsEnglish · 1 year ago
message-square
0
link
fedilink
In my opinion, you should only introduce a named tuple to your code when you're updating a preexisting API that was already returning a tuple or you are wrapping a tuple return value from another API. Let's start with when you should use named tuples. Usually an API that returns

Comments

alert-triangle
You must log in or # to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 48 users / day
  • 149 users / week
  • 556 users / month
  • 1.51K users / 6 months
  • 2 local subscribers
  • 353 subscribers
  • 12.3K Posts
  • 728 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org