Y
Hacker News
new
|
ask
|
show
|
jobs
by
EdSchouten
1641 days ago
my_point3d = (1.0, 2.5, 7.2)
Voila!
1 comments
Fatnino
1641 days ago
This is explicitly called out in the article.
What does your code do when I try my_point3d.x ?
link
zem
1641 days ago
you can do that with namedtuples too; the problem is that tuples are immutable, so you cannot say e.g. `my_point3d.x = 10`
link
What does your code do when I try my_point3d.x ?