Modify ↓
Ticket #216 (new defect)
Representer error
| Reported by: | anonymous | Owned by: | xi |
|---|---|---|---|
| Priority: | normal | Component: | pyyaml |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I think that type should reverse to exception results see code:
def represent_unicode(self, data):
tag = None try:
data.encode('ascii') tag = u'tag:yaml.org,2002:python/unicode'
except UnicodeEncodeError?:
tag = u'tag:yaml.org,2002:str'
return self.represent_scalar(tag, data)
Attachments
Change History
comment:2 Changed 18 months ago by anonymous
Look that is vaild since YAML str is unicode : ) http://www.yaml.org/type/
Note: See
TracTickets for help on using
tickets.

Should be: