This snippet:
a = np.arange(12, 0, -1).reshape(3, 4)
(a := a.flatten()).sort()
print(a)
produces
[ 1 2 3 4 5 6 7 8 9 10 11 12]
as expected. Without named expression:
a = np.arange(12, 0, -1).reshape(3, 4)
a = a.flatten().sort()
print(a)
I'm getting None. Why is that?