frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Warcraftcn/UI – UI component library inspired by classic Warcraft III aesthetics

https://www.warcraftcn.com/
1•vyrotek•30s ago•0 comments

Trump Vodka Becomes Available for Pre-Orders

https://www.forbes.com/sites/kirkogunrinde/2025/12/01/trump-vodka-becomes-available-for-pre-order...
1•stopbulying•1m ago•0 comments

Velocity of Money

https://en.wikipedia.org/wiki/Velocity_of_money
1•gurjeet•4m ago•0 comments

Stop building automations. Start running your business

https://www.fluxtopus.com/automate-your-business
1•valboa•8m ago•1 comments

You can't QA your way to the frontier

https://www.scorecard.io/blog/you-cant-qa-your-way-to-the-frontier
1•gk1•9m ago•0 comments

Show HN: PalettePoint – AI color palette generator from text or images

https://palettepoint.com
1•latentio•10m ago•0 comments

Robust and Interactable World Models in Computer Vision [video]

https://www.youtube.com/watch?v=9B4kkaGOozA
1•Anon84•14m ago•0 comments

Nestlé couldn't crack Japan's coffee market.Then they hired a child psychologist

https://twitter.com/BigBrainMkting/status/2019792335509541220
1•rmason•15m ago•0 comments

Notes for February 2-7

https://taoofmac.com/space/notes/2026/02/07/2000
2•rcarmo•16m ago•0 comments

Study confirms experience beats youthful enthusiasm

https://www.theregister.com/2026/02/07/boomers_vs_zoomers_workplace/
2•Willingham•23m ago•0 comments

The Big Hunger by Walter J Miller, Jr. (1952)

https://lauriepenny.substack.com/p/the-big-hunger
2•shervinafshar•25m ago•0 comments

The Genus Amanita

https://www.mushroomexpert.com/amanita.html
1•rolph•30m ago•0 comments

We have broken SHA-1 in practice

https://shattered.io/
9•mooreds•30m ago•2 comments

Ask HN: Was my first management job bad, or is this what management is like?

1•Buttons840•31m ago•0 comments

Ask HN: How to Reduce Time Spent Crimping?

2•pinkmuffinere•33m ago•0 comments

KV Cache Transform Coding for Compact Storage in LLM Inference

https://arxiv.org/abs/2511.01815
1•walterbell•37m ago•0 comments

A quantitative, multimodal wearable bioelectronic device for stress assessment

https://www.nature.com/articles/s41467-025-67747-9
1•PaulHoule•39m ago•0 comments

Why Big Tech Is Throwing Cash into India in Quest for AI Supremacy

https://www.wsj.com/world/india/why-big-tech-is-throwing-cash-into-india-in-quest-for-ai-supremac...
1•saikatsg•39m ago•0 comments

How to shoot yourself in the foot – 2026 edition

https://github.com/aweussom/HowToShootYourselfInTheFoot
1•aweussom•40m ago•0 comments

Eight More Months of Agents

https://crawshaw.io/blog/eight-more-months-of-agents
4•archb•42m ago•0 comments

From Human Thought to Machine Coordination

https://www.psychologytoday.com/us/blog/the-digital-self/202602/from-human-thought-to-machine-coo...
1•walterbell•42m ago•0 comments

The new X API pricing must be a joke

https://developer.x.com/
1•danver0•43m ago•0 comments

Show HN: RMA Dashboard fast SAST results for monorepos (SARIF and triage)

https://rma-dashboard.bukhari-kibuka7.workers.dev/
1•bumahkib7•43m ago•0 comments

Show HN: Source code graphRAG for Java/Kotlin development based on jQAssistant

https://github.com/2015xli/jqassistant-graph-rag
1•artigent•48m ago•0 comments

Python Only Has One Real Competitor

https://mccue.dev/pages/2-6-26-python-competitor
4•dragandj•50m ago•0 comments

Tmux to Zellij (and Back)

https://www.mauriciopoppe.com/notes/tmux-to-zellij/
1•maurizzzio•50m ago•1 comments

Ask HN: How are you using specialized agents to accelerate your work?

1•otterley•52m ago•0 comments

Passing user_id through 6 services? OTel Baggage fixes this

https://signoz.io/blog/otel-baggage/
1•pranay01•53m ago•0 comments

DavMail Pop/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway

https://davmail.sourceforge.net/
1•todsacerdoti•53m ago•0 comments

Visual data modelling in the browser (open source)

https://github.com/sqlmodel/sqlmodel
1•Sean766•55m 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.