this post was submitted on 21 Aug 2025
47 points (91.2% liked)

Technology

74546 readers
5437 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] eager_eagle@lemmy.world 2 points 1 week ago (1 children)

from X import *

That's malpractice in most cases, and thankfully, becoming more rare to find in the wild. Any decent linter will shout at you for using star imports.

What he’s trying to do is to get people to not use non-LTR approaces when designing APIs.

Then he should have picked examples of APIs that break this, not use the built-in functions. Because as it reads now, it seems he is just against established conventions for purism.

this problem is huge in C libraries

yeah, one of my favorite things about python is that everything not in the language itself is either defined in the file, or explicitly imported. Unless, like mentioned, you have anti-patterns like star imports and scripts messing with globals().

[–] squaresinger@lemmy.world 1 points 1 week ago

He's using simple examples that everyone knows and understands instantly. It's like using a minimal test case to report a bug. In most cases a minimal test case is also nonsensical on its own, but it's used to show an issue that occurred in a more complex context without overloading the reader with useless garbage info that doesn't contribute to the point at hand.