This is super interesting! I've never seen codecs used to introduce language features like this... Do you have any good references for getting started with using codecs?
Also, I wonder if there's an easy way to implement this in a jupyter notebook, without fiddling with the kernel...
(issues of whether it's a good idea aside, definitely seems useful to know about.. )