3 ms·
I really like C#'s => operator, especially in the context of expression-body members. public override string ToString() => $"{fname} {lname}".Trim(); I am o
by hprotagonist 8y ago
I really like C#'s => operator, especially in the context of expression-body members.
public override string ToString() => $"{fname} {lname}".Trim();
I am overjoyed with newer python's f-strings.
foo = 5
bar = 4.5005
print(f'foo is {foo} and the first bit of bar is {bar:0.2f}')
I really like python's * and * unpacking, and especially that you can do it in the middle with throwaways:
first, *_, last = function_that_returns_ten_things()
or for building kwarg-only classes from dicts:
foo = {'x':5,'y':6}
bar = Point(**foo)