Title: Deprecate slice __getitem__ and __setitem__ on HumanName · Issue #258 · derek73/python-nameparser · GitHub
Open Graph Title: Deprecate slice __getitem__ and __setitem__ on HumanName · Issue #258 · derek73/python-nameparser
X Title: Deprecate slice __getitem__ and __setitem__ on HumanName · Issue #258 · derek73/python-nameparser
Description: The list/dict emulation on HumanName is wider than its value: name[1:-3] slices the internal members list positionally — the oddest surviving API (currently a usage.rst example); field access by position has no real use case name['first'...
Open Graph Description: The list/dict emulation on HumanName is wider than its value: name[1:-3] slices the internal members list positionally — the oddest surviving API (currently a usage.rst example); field access by po...
X Description: The list/dict emulation on HumanName is wider than its value: name[1:-3] slices the internal members list positionally — the oddest surviving API (currently a usage.rst example); field access by po...
Opengraph URL: https://github.com/derek73/python-nameparser/issues/258
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deprecate slice __getitem__ and __setitem__ on HumanName","articleBody":"The list/dict emulation on `HumanName` is wider than its value:\n\n- `name[1:-3]` slices the internal members list positionally — the oddest surviving API (currently a usage.rst example); field access by position has no real use case\n- `name['first'] = x` duplicates plain attribute assignment\n\nKeep: `name['first']` string-key access (harmless, useful for dynamic field names), and `__iter__`/`__len__` — `len(name) == 0` was enshrined in 1.3.0 as the emptiness check when `unparsable` was removed, and `__str__` iterates for the `string_format=None` path.\n\n## Bridge (1.4) — tracked in #263\n\n- [ ] `DeprecationWarning` on slice `__getitem__` and on `__setitem__`\n- [ ] Replace the usage.rst slicing example\n\n","author":{"url":"https://github.com/derek73","@type":"Person","name":"derek73"},"datePublished":"2026-07-06T07:45:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/258/python-nameparser/issues/258"}
| 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:bcba9b68-a76b-d53d-3644-27712b40f739 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A126:2FEF13:5A8D3:7B8F8:6A558310 |
| html-safe-nonce | 016da152efda467221b48149ab0295ce67b74c36660fb843597883afef3f0e50 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTI2OjJGRUYxMzo1QThEMzo3QjhGODo2QTU1ODMxMCIsInZpc2l0b3JfaWQiOiIzMjU2MDQ1OTAzMjI5MDU5ODU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a6eb4c4678e774b396c679b5d43df002abd086a90110812d2d03a459d5357f4d |
| hovercard-subject-tag | issue:4817045716 |
| 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/derek73/python-nameparser/258/issue_layout |
| twitter:image | https://opengraph.githubassets.com/62d982aa7ef190540982b77b6ba213495eff7b7ae79163b0f97edf5ba8e7399e/derek73/python-nameparser/issues/258 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/62d982aa7ef190540982b77b6ba213495eff7b7ae79163b0f97edf5ba8e7399e/derek73/python-nameparser/issues/258 |
| og:image:alt | The list/dict emulation on HumanName is wider than its value: name[1:-3] slices the internal members list positionally — the oddest surviving API (currently a usage.rst example); field access by po... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | derek73 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/derek73/python-nameparser git https://github.com/derek73/python-nameparser.git |
| octolytics-dimension-user_id | 18306 |
| octolytics-dimension-user_login | derek73 |
| octolytics-dimension-repository_id | 18353524 |
| octolytics-dimension-repository_nwo | derek73/python-nameparser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18353524 |
| octolytics-dimension-repository_network_root_nwo | derek73/python-nameparser |
| 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 | 3215163789b3dc58dba97bd78a30c20c949f477f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width