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

set literals #43901

Closed
birkenfeld opened this issue Aug 28, 2006 · 3 comments
Closed

set literals #43901

birkenfeld opened this issue Aug 28, 2006 · 3 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@birkenfeld
Copy link
Member

BPO 1547796
Nosy @gvanrossum, @birkenfeld
Files
  • set-literals.diff: Support "bpo-" in Misc/NEWS #1
  • 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/gvanrossum'
    closed_at = <Date 2008-01-06.22:29:46.460>
    created_at = <Date 2006-08-28.10:20:21.000>
    labels = ['interpreter-core']
    title = 'set literals'
    updated_at = <Date 2008-01-06.22:29:46.460>
    user = 'https://github.com/birkenfeld'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:46.460>
    actor = 'admin'
    assignee = 'gvanrossum'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2006-08-28.10:20:21.000>
    creator = 'georg.brandl'
    dependencies = []
    files = ['7506']
    hgrepos = []
    issue_num = 1547796
    keywords = ['patch']
    message_count = 3.0
    messages = ['50997', '50998', '50999']
    nosy_count = 2.0
    nosy_names = ['gvanrossum', 'georg.brandl']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1547796'
    versions = ['Python 3.0']

    @birkenfeld
    Copy link
    Member Author

    A rough patch implementing {1, 2, 3}-style set literals.
    There is no empty set literal.

    @birkenfeld birkenfeld added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Aug 28, 2006
    @birkenfeld birkenfeld added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Aug 28, 2006
    @gvanrossum
    Copy link
    Member

    Logged In: YES
    user_id=6380

    Committed revision 51631.

    despite two (related?) flaws:

    (1)
    ../Python/symtable.c: In function symtable_visit_expr': ../Python/symtable.c:1209: warning: enumeration value Set_kind' not handled in switch

    (2)
    >>> {(x for x in range(10))}
    KeyError: 'unknown symbol table entry'
    >>> 

    (Don't ask me why that was the third thing I tried with the
    new syntax. :-)

    Also, I'd love set comprehensions!

    @birkenfeld
    Copy link
    Member Author

    Logged In: YES
    user_id=849994

    Okay, fixed the symtable issue.

    Hopefully other people also do weird things with the new
    syntax, the unit tests aren't very thorough (yet).

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 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

    2 participants