Changes between Initial Version and Version 1 of Ticket #166


Ignore:
Timestamp:
10/11/10 02:09:00 (4 years ago)
Author:
xi
Comment:

You could use __with_libyaml__ to check whether libyaml bindings are available or not. For instance,

import yaml
if yaml.__with_libyaml__:
    data = yaml.load(input, Loader=yaml.CLoader)
else:
    data = yaml.load(input)

The pure-Python and libyaml-based emitters may emit valid, but slightly different representations of the same document, therefore, to make the output deterministic regardless of whether libyaml is available or not, PyYAML always uses pure-Python parser and emitter by default.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #166

    • Property Status changed from new to closed
    • Property Resolution changed from to wontfix
  • Ticket #166 – Description

    initial v1  
    1 Currently PyYAML only use python implementation although the libyaml available. The following simple changes on __init__.py should do: 
    2 (I'm not sure whats the use of __with_libyaml__) 
     1Currently PyYAML only use python implementation although the libyaml available. The following simple changes on `__init__.py` should do: 
     2(I'm not sure whats the use of `__with_libyaml__`) 
    33 
    44{{{