y = x if x > 0 else x if x < 0 else 0
In the fourth paragraph of link [1] in the above post they explain quite well why we can get away with this type of trickery even if it seems wrong.
I'm confused where you're seeing absolute value? I never had absolute value anywhere. The second example I wrote just amounted to y = x.