Message 293289 - Python tracker
I'm not sure the "safer" meaning. If it is about for beginner less confuse when mistakenly typing "d[long_<tab>", the answer will be yes for only complete string keys. Impl complexity between str-only and not-str-only will not have too much different, only need to change the sentinel and some other work.