Changeset 328 for pyyaml/trunk/lib/yaml/emitter.py
- Timestamp:
- 12/29/08 12:24:05 (3 years ago)
- Files:
-
- 1 modified
-
pyyaml/trunk/lib/yaml/emitter.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/emitter.py
r313 r328 546 546 % (handle.encode('utf-8'))) 547 547 for ch in handle[1:-1]: 548 if not (u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'\548 if not (u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z' \ 549 549 or ch in u'-_'): 550 550 raise EmitterError("invalid character %r in the tag handle: %r" … … 561 561 while end < len(prefix): 562 562 ch = prefix[end] 563 if u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'\563 if u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z' \ 564 564 or ch in u'-;/?!:@&=+$,_.~*\'()[]': 565 565 end += 1 … … 591 591 while end < len(suffix): 592 592 ch = suffix[end] 593 if u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'\593 if u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z' \ 594 594 or ch in u'-;/?:@&=+$,_.~*\'()[]' \ 595 595 or (ch == u'!' and handle != u'!'): … … 614 614 raise EmitterError("anchor must not be empty") 615 615 for ch in anchor: 616 if not (u'0' <= ch <= u'9' or u'A' <= ch <= 'Z' or u'a' <= ch <= 'z'\616 if not (u'0' <= ch <= u'9' or u'A' <= ch <= u'Z' or u'a' <= ch <= u'z' \ 617 617 or ch in u'-_'): 618 618 raise EmitterError("invalid character %r in the anchor: %r"
