improves Encoding's __getitem__ and __contains__