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

Add nondestructive selection to sets #53076

Closed
ipatrol mannequin opened this issue May 27, 2010 · 2 comments
Closed

Add nondestructive selection to sets #53076

ipatrol mannequin opened this issue May 27, 2010 · 2 comments
Labels
type-feature A feature request or enhancement

Comments

@ipatrol
Copy link
Mannequin

ipatrol mannequin commented May 27, 2010

BPO 8830
Nosy @ericvsmith, @ipatrol
Superseder
  • bpo-7212: Retrieve an arbitrary element from a set without removing it
  • 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 2010-05-27.01:36:13.233>
    created_at = <Date 2010-05-27.01:25:08.858>
    labels = ['type-feature']
    title = 'Add nondestructive selection to sets'
    updated_at = <Date 2010-05-27.01:36:13.223>
    user = 'https://github.com/ipatrol'

    bugs.python.org fields:

    activity = <Date 2010-05-27.01:36:13.223>
    actor = 'eric.smith'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-05-27.01:36:13.233>
    closer = 'eric.smith'
    components = ['None']
    creation = <Date 2010-05-27.01:25:08.858>
    creator = 'ipatrol'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 8830
    keywords = []
    message_count = 2.0
    messages = ['106590', '106591']
    nosy_count = 2.0
    nosy_names = ['eric.smith', 'ipatrol']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '7212'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue8830'
    versions = ['Python 2.7', 'Python 3.2']

    @ipatrol
    Copy link
    Mannequin Author

    ipatrol mannequin commented May 27, 2010

    I see in a lot of references for computer programming a function that returns an arbitrary value from a standard or frozen set. http://en.wikipedia.org/wiki/Set_%28computer_science%29 describes it as pick. It surprised me when I discovered that Python sets don't have this method. I would suggest the returned value be somewhat random to prevent repeated calls from returning repeated results. Perhaps a small C-level counter could control that, which can then roll over uneventfully if enough calls are made.

    @ipatrol ipatrol mannequin added the type-feature A feature request or enhancement label May 27, 2010
    @ericvsmith
    Copy link
    Member

    This is a dupe of bpo-7212.

    @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
    type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant