Bugs item #1483384, was opened at 2006-05-07 11:41 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1483384&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Feature Request Status: Open Resolution: None Priority: 5 Submitted By: Michael Tsai (michaeltsai) Assigned to: Nobody/Anonymous (nobody) Summary: Add set.member() method Initial Comment: Right now, when I check membership in a set, the __in__ method just returns True/False if there is an object in the set that's == to the argument. I would like to have a member() method that returns the object in the set or raises KeyError if the argument is not in the set. This would be useful for interning and other cases where right now I'd use a degenerate dictionary where the keys and values are equal. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1483384&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com