Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Generator Object/Type #40276

Closed
jwpye mannequin opened this issue May 20, 2004 · 5 comments
Closed

Public Generator Object/Type #40276

jwpye mannequin opened this issue May 20, 2004 · 5 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@jwpye
Copy link
Mannequin

jwpye mannequin commented May 20, 2004

BPO 957398
Nosy @loewis
Files
  • pubgen.diff: This patches concrete.tex, ceval.[ch], Makefile.pre.in
  • genobject.c
  • genobject.h
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/loewis'
    closed_at = <Date 2004-06-01.16:33:26.000>
    created_at = <Date 2004-05-20.13:59:31.000>
    labels = ['interpreter-core']
    title = 'Public Generator Object/Type'
    updated_at = <Date 2004-06-01.16:33:26.000>
    user = 'https://bugs.python.org/jwpye'

    bugs.python.org fields:

    activity = <Date 2004-06-01.16:33:26.000>
    actor = 'loewis'
    assignee = 'loewis'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2004-05-20.13:59:31.000>
    creator = 'jwpye'
    dependencies = []
    files = ['5980', '5981', '5982']
    hgrepos = []
    issue_num = 957398
    keywords = ['patch']
    message_count = 5.0
    messages = ['46026', '46027', '46028', '46029', '46030']
    nosy_count = 2.0
    nosy_names = ['loewis', 'jwpye']
    pr_nums = []
    priority = 'high'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue957398'
    versions = ['Python 2.4']

    @jwpye
    Copy link
    Mannequin Author

    jwpye mannequin commented May 20, 2004

    Here the patches/files for public generator object/type.
    removal patch for ceval.c

    @jwpye jwpye mannequin closed this as completed May 20, 2004
    @jwpye jwpye mannequin assigned loewis May 20, 2004
    @jwpye jwpye mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 20, 2004
    @jwpye jwpye mannequin closed this as completed May 20, 2004
    @jwpye jwpye mannequin assigned loewis May 20, 2004
    @jwpye jwpye mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 20, 2004
    @jwpye
    Copy link
    Mannequin Author

    jwpye mannequin commented May 20, 2004

    Logged In: YES
    user_id=1044177

    Ok, got it to compile, and tried out a simple generator;
    seems to be fine..

    Probably should have asked first, but I'm assuming(yay) that
    it was desired to draw it inline with *object.[ch]
    organization protocol..

    Only gotcha appears to be that genobject.c, of course,
    references eval_frame, so I just wrapped a call to it in
    eval.c with a non-static function(PyEval_EvaluateFrame()),
    this is probably not be what python-dev would like.. I
    mostly did it like this to get it to compile.(probably a bad
    idea, and should probably reference it directly. no need for
    an extra layer of function call overhead...)

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented May 31, 2004

    Logged In: YES
    user_id=21627

    What is the purpose of this patch?

    @jwpye
    Copy link
    Mannequin Author

    jwpye mannequin commented May 31, 2004

    Logged In: YES
    user_id=1044177

    Externalize the generator type so that it can be easily
    accessed/referenced by extension mod authors and embedders..

    http://mail.python.org/pipermail/python-dev/2004-May/044742.html

    I would use it, as an embedder, in my postgresql extension:
    http://gborg.postgresql.org/project/postgrespy/projdisplay.php

    Currently, I compile a little generator and snag the
    type(this is the same thing as from types import
    GeneratorType, I suppose), and will do so if I don't have
    direct access. I also access parts of the generator,
    currently using getattr, but if I had access to it, I would
    do it directly.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 1, 2004

    Logged In: YES
    user_id=21627

    Thanks for the patch. Applied as

    Makefile.pre.in 1.143
    concrete.tex 1.40
    ceval.h 2.51
    genobject.h 2.1
    NEWS 1.981
    genobject.c 1.1
    ceval.c 2.397

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants