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

Return objects in Tkinter #36111

Closed
loewis mannequin opened this issue Feb 17, 2002 · 6 comments
Closed

Return objects in Tkinter #36111

loewis mannequin opened this issue Feb 17, 2002 · 6 comments

Comments

@loewis
Copy link
Mannequin

loewis mannequin commented Feb 17, 2002

BPO 518625
Nosy @gvanrossum, @loewis, @jackjansen
Files
  • tkinter.diff
  • 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 = None
    closed_at = <Date 2003-05-19.13:29:32.000>
    created_at = <Date 2002-02-17.00:36:19.000>
    labels = ['expert-tkinter']
    title = 'Return objects in Tkinter'
    updated_at = <Date 2003-05-19.13:29:32.000>
    user = 'https://github.com/loewis'

    bugs.python.org fields:

    activity = <Date 2003-05-19.13:29:32.000>
    actor = 'jackjansen'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Tkinter']
    creation = <Date 2002-02-17.00:36:19.000>
    creator = 'loewis'
    dependencies = []
    files = ['3991']
    hgrepos = []
    issue_num = 518625
    keywords = ['patch']
    message_count = 6.0
    messages = ['39006', '39007', '39008', '39009', '39010', '39011']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'loewis', 'jackjansen']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue518625'
    versions = []

    @loewis
    Copy link
    Mannequin Author

    loewis mannequin commented Feb 17, 2002

    This patch uses the Tcl object API to convert return
    values to Python objects. For boolean, bytearray,
    double, int, list, and string objects, the equivalent
    Python objects are constructed (Unicode for Tcl
    string). For untyped objects, strings are returned. For
    all other objects, a Python wrapper object is returned
    which supports a tp_str conversion.

    @loewis loewis mannequin closed this as completed Feb 17, 2002
    @loewis loewis mannequin added the topic-tkinter label Feb 17, 2002
    @loewis loewis mannequin closed this as completed Feb 17, 2002
    @loewis loewis mannequin added the topic-tkinter label Feb 17, 2002
    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    Looks OK in theory.

    @loewis
    Copy link
    Mannequin Author

    loewis mannequin commented Nov 22, 2002

    Logged In: YES
    user_id=21627

    I was originally asked to put this on SF for review because
    the potential backwards incompatibility in return types.
    IDLE seems to work fine with this change, so I expect
    incompatibility to come up rarely.

    Can I commit this as-is, with the suggestion that
    applications that break with this can do

    import Tkinter
    Tkinter.want_objects = 0

    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    I can't answer that question, since I don't know what's out
    in the field. If you don't get response from python-dev,
    let's try this and see how it fares during the alpha tests.

    @loewis
    Copy link
    Mannequin Author

    loewis mannequin commented Nov 26, 2002

    Logged In: YES
    user_id=21627

    Since there were no further comments, committed as

    Tkinter.py 1.166
    NEWS 1.543
    _tkinter.c 1.131

    @jackjansen
    Copy link
    Member

    Logged In: YES
    user_id=45365

    According to some of the Tcl/Tk folks there is a problem with this patch, in
    that Tcl objects really *are* strings, and any typing is purely an
    implementation speedup shortcut. This showed up when Tkinter got a
    floating point value for tcl_version on MacOSX. Details are in bug report
    bpo-729317.

    I'm adding this comment purely to make sure this bit of knowledge doesn't
    get lost.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants