frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Seedance 2.0 AI video generator for creators and ecommerce

https://seedance-2.net
1•dallen97•26s ago•0 comments

Wally: A fun, reliable voice assistant in the shape of a penguin

https://github.com/JLW-7/Wally
1•PaulHoule•1m ago•0 comments

Rewriting Pycparser with the Help of an LLM

https://eli.thegreenplace.net/2026/rewriting-pycparser-with-the-help-of-an-llm/
1•y1n0•3m ago•0 comments

Lobsters Vibecoding Challenge

https://gist.github.com/MostAwesomeDude/bb8cbfd005a33f5dd262d1f20a63a693
1•tolerance•3m ago•0 comments

E-Commerce vs. Social Commerce

https://moondala.one/
1•HamoodBahzar•4m ago•1 comments

Avoiding Modern C++ – Anton Mikhailov [video]

https://www.youtube.com/watch?v=ShSGHb65f3M
1•linkdd•5m ago•0 comments

Show HN: AegisMind–AI system with 12 brain regions modeled on human neuroscience

https://www.aegismind.app
2•aegismind_app•9m ago•1 comments

Zig – Package Management Workflow Enhancements

https://ziglang.org/devlog/2026/#2026-02-06
1•Retro_Dev•10m ago•0 comments

AI-powered text correction for macOS

https://taipo.app/
1•neuling•14m ago•1 comments

AppSecMaster – Learn Application Security with hands on challenges

https://www.appsecmaster.net/en
1•aqeisi•15m ago•1 comments

Fibonacci Number Certificates

https://www.johndcook.com/blog/2026/02/05/fibonacci-certificate/
1•y1n0•17m ago•0 comments

AI Overviews are killing the web search, and there's nothing we can do about it

https://www.neowin.net/editorials/ai-overviews-are-killing-the-web-search-and-theres-nothing-we-c...
3•bundie•22m ago•1 comments

City skylines need an upgrade in the face of climate stress

https://theconversation.com/city-skylines-need-an-upgrade-in-the-face-of-climate-stress-267763
3•gnabgib•22m ago•0 comments

1979: The Model World of Robert Symes [video]

https://www.youtube.com/watch?v=HmDxmxhrGDc
1•xqcgrek2•27m ago•0 comments

Satellites Have a Lot of Room

https://www.johndcook.com/blog/2026/02/02/satellites-have-a-lot-of-room/
2•y1n0•27m ago•0 comments

1980s Farm Crisis

https://en.wikipedia.org/wiki/1980s_farm_crisis
4•calebhwin•28m ago•1 comments

Show HN: FSID - Identifier for files and directories (like ISBN for Books)

https://github.com/skorotkiewicz/fsid
1•modinfo•33m ago•0 comments

Show HN: Holy Grail: Open-Source Autonomous Development Agent

https://github.com/dakotalock/holygrailopensource
1•Moriarty2026•40m ago•1 comments

Show HN: Minecraft Creeper meets 90s Tamagotchi

https://github.com/danielbrendel/krepagotchi-game
1•foxiel•47m ago•1 comments

Show HN: Termiteam – Control center for multiple AI agent terminals

https://github.com/NetanelBaruch/termiteam
1•Netanelbaruch•48m ago•0 comments

The only U.S. particle collider shuts down

https://www.sciencenews.org/article/particle-collider-shuts-down-brookhaven
2•rolph•50m ago•1 comments

Ask HN: Why do purchased B2B email lists still have such poor deliverability?

1•solarisos•51m ago•3 comments

Show HN: Remotion directory (videos and prompts)

https://www.remotion.directory/
1•rokbenko•53m ago•0 comments

Portable C Compiler

https://en.wikipedia.org/wiki/Portable_C_Compiler
2•guerrilla•55m ago•0 comments

Show HN: Kokki – A "Dual-Core" System Prompt to Reduce LLM Hallucinations

1•Ginsabo•55m ago•0 comments

Software Engineering Transformation 2026

https://mfranc.com/blog/ai-2026/
1•michal-franc•57m ago•0 comments

Microsoft purges Win11 printer drivers, devices on borrowed time

https://www.tomshardware.com/peripherals/printers/microsoft-stops-distrubitng-legacy-v3-and-v4-pr...
3•rolph•57m ago•1 comments

Lunch with the FT: Tarek Mansour

https://www.ft.com/content/a4cebf4c-c26c-48bb-82c8-5701d8256282
2•hhs•1h ago•0 comments

Old Mexico and her lost provinces (1883)

https://www.gutenberg.org/cache/epub/77881/pg77881-images.html
1•petethomas•1h ago•0 comments

'AI' is a dick move, redux

https://www.baldurbjarnason.com/notes/2026/note-on-debating-llm-fans/
5•cratermoon•1h ago•0 comments
Open in hackernews

Identity vs. Equality in Python

https://pythonkoans.substack.com/p/koan-2-the-tale-of-two-scrolls
11•meander_water•6mo ago

Comments

tuhriel•6mo ago
One big hurdle, I guess most new pythonistas stumble over, is the one where you add an create an empty default list in a class:

You would think it creates a new empty list, for each object of this class, but it actually creates one which is shared between all of the objects. I had a lot of fun with that one once.

zahlman•6mo ago
> but it actually creates one which is shared between all of the objects

More precisely: it creates one which belongs to the class. Everything inside the `class` block is thus - both data and methods. After all, the methods are not special - from the class' perspective, they are just functions, and functions are objects, and they become attributes of the class object the same way as "ordinary data". (Further: the `def` statement is a form of assignment.)

"Methods" don't really exist ahead of time; they're created on demand when they're looked up from an instance, found in a class, and furthermore discovered to implement the descriptor protocol. The interesting part is that looking up an attribute on an instance can find it in the class. That's what allows method calls to work properly (in Python's implementation) without storing per-instance data — objects representing the "bound" method are instead created on demand (and typically thrown away right after)! This is necessary because anywhere that `foo.bar()` is valid, `foo.bar` must also be valid, and furthermore needs to evaluate to something — since it's a subexpression of a valid subexpression, and Python has no "void return values", only a strong expression/statement distinction. This feature also enables you to do `baz = foo.bar; baz()`.

(There are several sources I could quote for all of this, but usually it's tangential to what the source is actually trying to discuss.)

More fundamentally, Python beginners often fail to distinguish assignment from mutation. So they are further surprised when `instance.items.append(item)` affects the other instances, but `instance.items = [item]` does not. But this is entirely to be expected: assignment to an instance attribute only ever stores it within the instance, and does not look it up or replace it in the class. Of course it doesn't — if it did, there would be no way to implement `__init__`. And now that the instance has a separate attribute with the same name, that shadows the class' attribute, and will be found by future lookups on that instance only.