Skip to content

Commit e91bbdb

Browse files
committed
Comment on namedtuples usage, for reference
1 parent 471cff9 commit e91bbdb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spark/helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def parse_item(raw_string):
1616
return Item(*f)
1717

1818
# Uso básico de namedtuples:
19+
# Thing = namedtuple('Item', ['foo', 'bar'])
20+
# some = Thing(foo=42, bar='hello')
21+
# some.foo
1922
# item = parse_item(["one", "two"])
2023
# new_item = item._replace(tx_id=1, buyer=5)
2124

0 commit comments

Comments
 (0)