Deprecate the tuple API (`object[index]`') of `structseq` objects like `os.stat_result`
Discussions on Python.org
Deprecate the tuple API (`object[index]`') of `structseq` objects like `os.stat_result`
Hi, I propose deprecating os.stat(filename)[8] tuple API to migrate to os.stat(filename).st_mtime named attributes. The tuple API exists for backward compatibility with Python 2.1 and older which was released 25 years ago. The tuple API requires a good memory to remind members by their indexes. What are these members? os.uname()[4] pwd.getpwnam('root')[3] sys.float_info[9] sys.flags[14] Answers: os.uname().machine pwd.getpwnam('root').pw_uid sys.float_info.radix sys.flags.utf8_mode In ...
0 comments
No comments yet.