Commits

Kirill Simonov committed cec54e5

Allow first=None for add_implicit_resolver.

  • Participants
  • Parent commits 92c5f70
  • Tags 3.01

Comments (0)

Files changed (1)

lib/yaml/resolver.py

     def add_implicit_resolver(cls, tag, regexp, first):
         if not 'yaml_implicit_resolvers' in cls.__dict__:
             cls.yaml_implicit_resolvers = cls.yaml_implicit_resolvers.copy()
+        if first is None:
+            first = [None]
         for ch in first:
             cls.yaml_implicit_resolvers.setdefault(ch, []).append((tag, regexp))
     add_implicit_resolver = classmethod(add_implicit_resolver)