Package pyamf :: Package adapters :: Module _sets

[hide private]
[frames] | no frames]

# Source Code for Module pyamf.adapters._sets

     1  # Copyright (c) 2007-2009 The PyAMF Project.
     2  # See LICENSE.txt for details.
     3
     4  """
     5  Adapter for the stdlib C{sets} module.
     6
     7  @since: 0.4
     8  """
     9
    10  import sets
    11
    12  import pyamf
    13  from pyamf.adapters import util
    14
    15
    16  if hasattr(sets, 'ImmutableSet'):
    17      pyamf.add_type(sets.ImmutableSet, util.to_tuple)
    18
    19  if hasattr(sets, 'Set'):
    20      pyamf.add_type(sets.Set, util.to_tuple)
    21