view roundup/anypy/sets_.py @ 4547:d9d7319afffa

Add config-option "nosy" to messages_to_author setting in [nosy] section... ...of config: This will send a message to the author only in the case where the author is on the nosy-list (either added earlier or via the add_author setting). Current config-options for this setting will send / not send to author without considering the nosy list. [[Posted on behalf of Dr. Schlatterbeck during the git conversion.]] committer: Eric S. Raymond <esr@thyrsus.com>
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Wed, 19 Oct 2011 11:32:20 -0400
parents 06af6d5bedbe
children
line wrap: on
line source

"""
anypy.sets_: sets compatibility module

uses the built-in type 'set' if available, and thus avoids
deprecation warnings. Simple usage:

Change all
    from sets import Set
to
    from roundup.anypy.sets_ import set

and use 'set' instead of 'Set'.
To avoid unnecessary imports, you can:

    try:
        set
    except NameError:
        from roundup.anypy.sets_ import set

see:
http://docs.python.org/library/sets.html#comparison-to-the-built-in-set-types

"""

try:
    set = set                     # built-in since Python 2.4
except (NameError, TypeError):
    from sets import Set as set   # deprecated as of Python 2.6

# vim: ts=8 sts=4 sw=4 si et

Roundup Issue Tracker: http://roundup-tracker.org/