Comment

Comment by kashif

The pythonic way of creating a Point like data structure is not

  point = {'x': 0, 'y': 0}
but instead, this

  Point = namedtuple('Point', ['x', 'y'], verbose=True)
The resulting class, I believe to be more performant than using a dictionary - but I haven't actually measured this.
parent kashif 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton