Index: /pyyaml/trunk/lib/yaml/parser.py
===================================================================
--- /pyyaml/trunk/lib/yaml/parser.py	(revision 222)
+++ /pyyaml/trunk/lib/yaml/parser.py	(revision 235)
@@ -292,5 +292,5 @@
                     end_mark = token.end_mark
                     anchor = token.value
-            if tag is not None and tag != u'!':
+            if tag is not None:
                 handle, suffix = tag
                 if handle is not None:
Index: /pyyaml/trunk/lib/yaml/representer.py
===================================================================
--- /pyyaml/trunk/lib/yaml/representer.py	(revision 225)
+++ /pyyaml/trunk/lib/yaml/representer.py	(revision 235)
@@ -13,5 +13,5 @@
     from sets import Set as set
 
-import sys, copy_reg
+import sys, copy_reg, types
 
 class RepresenterError(YAMLError):
@@ -36,16 +36,4 @@
         self.object_keeper = []
         self.alias_key = None
-
-    class C: pass
-    c = C()
-    def f(): pass
-    def g(): yield None
-    classobj_type = type(C)
-    instance_type = type(c)
-    function_type = type(f)
-    generator_type = type(g())
-    builtin_function_type = type(abs)
-    module_type = type(sys)
-    del C, c, f, g
 
     def get_classobj_bases(self, cls):
@@ -69,5 +57,5 @@
             self.object_keeper.append(data)
         data_types = type(data).__mro__
-        if type(data) is self.instance_type:
+        if type(data) is types.InstanceType:
             data_types = self.get_classobj_bases(data.__class__)+list(data_types)
         if data_types[0] in self.yaml_representers:
@@ -472,17 +460,17 @@
         Representer.represent_name)
 
-Representer.add_representer(Representer.classobj_type,
+Representer.add_representer(types.ClassType,
         Representer.represent_name)
 
-Representer.add_representer(Representer.function_type,
+Representer.add_representer(types.FunctionType,
         Representer.represent_name)
 
-Representer.add_representer(Representer.builtin_function_type,
+Representer.add_representer(types.BuiltinFunctionType,
         Representer.represent_name)
 
-Representer.add_representer(Representer.module_type,
+Representer.add_representer(types.ModuleType,
         Representer.represent_module)
 
-Representer.add_multi_representer(Representer.instance_type,
+Representer.add_multi_representer(types.InstanceType,
         Representer.represent_instance)
 
Index: /pyyaml/trunk/lib/yaml/constructor.py
===================================================================
--- /pyyaml/trunk/lib/yaml/constructor.py	(revision 234)
+++ /pyyaml/trunk/lib/yaml/constructor.py	(revision 235)
@@ -13,5 +13,5 @@
     from sets import Set as set
 
-import binascii, re, sys
+import binascii, re, sys, types
 
 class ConstructorError(MarkedYAMLError):
@@ -37,8 +37,4 @@
         if self.check_node():
             return self.construct_document(self.get_node())
-
-    def g(): yield None
-    generator_type = type(g())
-    del g
 
     def construct_document(self, node):
@@ -92,5 +88,5 @@
         else:
             data = constructor(self, tag_suffix, node)
-        if isinstance(data, self.generator_type):
+        if isinstance(data, types.GeneratorType):
             generator = data
             data = generator.next()
