Brett Cannon on Nostr: While https://snarky.ca/my-proof-of-concept-record-type/ never got enough support, I ...
While https://snarky.ca/my-proof-of-concept-record-type/ never got enough support, I wonder if I leaned into a class-like structure would garner more support?
```
record InventoryItem:
name
price
quantity
```
Add type annotations and it looks like a dataclass. Add in support for * and ** for attributes to control how the `__init__()` would work and then you keep the flexibility of my proposal from my blog w/o the awkward situation of how it looks without a docstring.
Thoughts?
```
record InventoryItem:
name
price
quantity
```
Add type annotations and it looks like a dataclass. Add in support for * and ** for attributes to control how the `__init__()` would work and then you keep the flexibility of my proposal from my blog w/o the awkward situation of how it looks without a docstring.
Thoughts?