summaryrefslogtreecommitdiff
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-17 02:38:46 +0000
committerTim Peters <tim.peters@gmail.com>2001-09-17 02:38:46 +0000
commit305b5857f6bef93e0fb21a821f7a5b995cd0889b (patch)
treea9bc5d4951946f2c7d4264755016c921b3daaf67 /Lib/posixpath.py
parentbc7e863ce2aa9d3b9e5077865647f5db0ee050de (diff)
downloadcpython-git-305b5857f6bef93e0fb21a821f7a5b995cd0889b.tar.gz
PyObject_Dir(): Merge in __members__ and __methods__ too (if they exist,
and are lists, and then just the string elements (if any)). There are good and bad reasons for this. The good reason is to support dir() "like before" on objects of extension types that haven't migrated to the class introspection API yet. The bad reason is that Python's own method objects are such a type, and this is the quickest way to get their im_self etc attrs to "show up" via dir(). It looks much messier to move them to the new scheme, as their current getattr implementation presents a view of their attrs that's a untion of their own attrs plus their im_func's attrs. In particular, methodobject.__dict__ actually returns methodobject.im_func.__dict__, and if that's important to preserve it doesn't seem to fit the class introspection model at all.
Diffstat (limited to 'Lib/posixpath.py')
0 files changed, 0 insertions, 0 deletions