
Aug. 6, 2020
1:51 a.m.
On 6/08/20 6:42 am, David Mertz wrote:
@unit("meter") a = 3 # a = unit("meter")("a", 3) @unit("foot") b = 4 # b = unit("foot")("b", 4)
This still doesn't explain why the decorator syntax would be significantly better than just calling the function directly. meters = unit("meter") feet = unit("foot") a = meters(3) b = feet(4) Seems just as readable to me. -- Greg