Hacker News new | ask | show | jobs
by EdSchouten 1641 days ago
my_point3d = (1.0, 2.5, 7.2)

Voila!

1 comments

This is explicitly called out in the article.

What does your code do when I try my_point3d.x ?

you can do that with namedtuples too; the problem is that tuples are immutable, so you cannot say e.g. `my_point3d.x = 10`