Title: Use PyStructSequence for result() return value · Issue #61 · python-ldap/python-ldap · GitHub
Open Graph Title: Use PyStructSequence for result() return value · Issue #61 · python-ldap/python-ldap
X Title: Use PyStructSequence for result() return value · Issue #61 · python-ldap/python-ldap
Description: The result/result2/result3/result4 API looks quite silly by today's standards, if you don't mind me saying. Do what os.stat does. result() should return an object that: for backwards compatibility, acts like a tuple of the first two elem...
Open Graph Description: The result/result2/result3/result4 API looks quite silly by today's standards, if you don't mind me saying. Do what os.stat does. result() should return an object that: for backwards compatibility,...
X Description: The result/result2/result3/result4 API looks quite silly by today's standards, if you don't mind me saying. Do what os.stat does. result() should return an object that: for backwards compat...
Opengraph URL: https://github.com/python-ldap/python-ldap/issues/61
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use PyStructSequence for result() return value","articleBody":"The [result](http://python-ldap.readthedocs.io/en/latest/reference/ldap.html#ldap.LDAPObject.result)/[result2](http://python-ldap.readthedocs.io/en/latest/reference/ldap.html#ldap.LDAPObject.result2)/[result3](http://python-ldap.readthedocs.io/en/latest/reference/ldap.html#ldap.LDAPObject.result3)/[result4](http://python-ldap.readthedocs.io/en/latest/reference/ldap.html#ldap.LDAPObject.result4) API looks quite silly by today's standards, if you don't mind me saying.\r\n\r\nDo what [os.stat does](https://docs.python.org/3/library/os.html#os.stat_result). `result()` should return an object that:\r\n- for backwards compatibility, acts like a tuple of the first two elements\r\n- has everything accessible as attributes.\r\n\r\nSuch a type can be defined at the C level using [Struct Sequence](https://docs.python.org/3/c-api/tuple.html#struct-sequence-objects).\r\nIn Python 2 this API is private; use a regular namedtuple subclass?\r\n\r\nDeprecate result2/result3/result4 (but keep them around indefinitely).","author":{"url":"https://github.com/encukou","@type":"Person","name":"encukou"},"datePublished":"2017-11-30T00:24:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/61/python-ldap/issues/61"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5e185e5e-f763-b34c-079c-808b380e1127 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED2C:14AB50:8B1DF79:B3F47B9:6975EF27 |
| html-safe-nonce | 042623bc1eaba5489df5e1bab246d9d0c7ec58b3e6b8758bf91e901f8119e1e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDJDOjE0QUI1MDo4QjFERjc5OkIzRjQ3Qjk6Njk3NUVGMjciLCJ2aXNpdG9yX2lkIjoiNjgxNzc1NjYyODYzMDg1MzUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1c2670f84b35b157467155de3d479346e0b1480941a4651549545b77fa7937b7 |
| hovercard-subject-tag | issue:277956156 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-ldap/python-ldap/61/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f54d7e91f106ddc743b091a7cff0b73f5baaf5c26b58857b1424bb98fc1732c8/python-ldap/python-ldap/issues/61 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f54d7e91f106ddc743b091a7cff0b73f5baaf5c26b58857b1424bb98fc1732c8/python-ldap/python-ldap/issues/61 |
| og:image:alt | The result/result2/result3/result4 API looks quite silly by today's standards, if you don't mind me saying. Do what os.stat does. result() should return an object that: for backwards compatibility,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | encukou |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2bce766e7450b03e00b2fc5badd417927ce33a860e78cda3e4ecb9bbd1374cc6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-ldap/python-ldap git https://github.com/python-ldap/python-ldap.git |
| octolytics-dimension-user_id | 33895877 |
| octolytics-dimension-user_login | python-ldap |
| octolytics-dimension-repository_id | 111794776 |
| octolytics-dimension-repository_nwo | python-ldap/python-ldap |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 111794776 |
| octolytics-dimension-repository_network_root_nwo | python-ldap/python-ldap |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fcca2b8ef702b5f7f91427a6e920fa44446fe312 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width