@danso I think the actual use of ~ in this context is mostly familiarity, like the !! truthiness trick. My biggest worry is that in places like slices and ranges it trips up the already confusing intuition around whether something is inclusive or exclusive.
It might defeat the point since it loses brevity, but you could get rid of the familiarity tax with a function.
fromEnd = lambda x: ~x
Eh, I like that less now that I've typed it out. But posting anyway for good measure.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.