Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Hacker NewsEnglish · 20 days ago

You might not need a Python class

adamgrant.micro.blog

external-link
message-square
2
fedilink
10
external-link

You might not need a Python class

adamgrant.micro.blog

RSS BotMB to Hacker NewsEnglish · 20 days ago
message-square
2
fedilink
You might not need a Python class :: Adam Grant —
adamgrant.micro.blog
external-link
Python is an incredibly versatile programming language known for its simplicity and readability. Among its features, the ability to use classes for object-oriented programming is both powerful and frequently recommended. However, classes aren’t always the best solution. In many cases, Python’s built-in types, functions, and standard library modules provide simpler, cleaner alternatives. Here are several scenarios where you might not need a Python class: Simple Data Containers: Use Named Tuples or Data Classes Often, classes are created just to store data.

Comments

  • ghost9@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    19 days ago

    No learn. Just vibe.

Hacker News

hackernews

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: !hackernews@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

Visibility: Public
globe

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

  • 312 users / day
  • 1.68K users / week
  • 4.23K users / month
  • 9.55K users / 6 months
  • 2 local subscribers
  • 2.32K subscribers
  • 28.4K Posts
  • 11.2K Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org