GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use type flag instead of custom constructor in `_struct.unpack_iterator` · Issue #104276 · python/cpython

Use type flag instead of custom constructor in _struct.unpack_iterator #104276

New issue
Copy link
New issue
Copy link
Closed
Closed
Use type flag instead of custom constructor in _struct.unpack_iterator#104276
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@chgnrdv
chgnrdv
opened on May 7, 2023
Issue body actions

Currently _struct.unpack_iterator type defines its own constructor just to report to user that it isn't instantiable (with a typo, by the way):

cpython/Modules/_struct.c

Lines 1835 to 1838 in 8d95012

PyObject *unpackiter_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
PyErr_Format(PyExc_TypeError, "Cannot create '%.200s objects", _PyType_Name(type));
return NULL;
}

It can be easily removed and replaced by appropriate type flag. I'll submit a PR.

Linked PRs

  • gh-104276: Make _struct.unpack_iterator type use type flag instead of custom constructor #104277

Activity

  1. chgnrdv
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 7, 2023
  2. kumaraditya303
    added a commit that references this issue on May 9, 2023

    gh-104276: Make `_struct.unpack_iterator` type use type flag instead …

    c21f828
  3. carljm
    added a commit that references this issue on May 9, 2023

    Merge branch 'main' into inlinecomp2

    95401fe
  4. chgnrdv
    closed this as completedon May 9, 2023
  5. carljm
    added 3 commits that reference this issue on May 9, 2023

    Merge branch 'main' into fixsendfamily

    a614216

    Merge branch 'main' into supermon

    c48eee3

    Merge branch 'main' into fixloadsuperspec

    cf11908
  6. serhiy-storchaka
    added this to Struct, memoryview and array issues 🏗️on Jul 13, 2026
  7. github-project-automation
    moved this from Todo to Done in Struct, memoryview and array issues 🏗️on Jul 13, 2026
  8. github-project-automation
    moved this to Todo in Struct, memoryview and array issues 🏗️on Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    • Struct, memoryview and array issues 🏗️
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.