In this other question, the votes clearly show that the os.path.splitext function is preferred over the simple .split(\'.\')[-1] string manipulatio
I am not sure Python has been ported on the VMS platform, but assuming it did (*):
I hope you realize that using a narrow-scope method, which is only influenced by the systems you are exposed on, isn't optimal for long-term code maintainability and such practices are particularly detrimental to mixing and matching disparate software components in larger software projects.
Essentially, in the latter case the success probability (dependability) is akin to
R(t)=1-(1-Ri)^n
and you can now see how poor/incomplete software implementations result into buggy programs. More broadly speaking, porting software is difficult precisely due to such bugs.
(*) hm, googling revealed quickly about: https://www.vmspython.org
(**) Check at the regex wars over here! https://stackoverflow.com/a/4465456/1574494