Ignore:
Timestamp:
12/30/08 13:18:53 (5 years ago)
Author:
xi
Message:

Final touches before the release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib3/yaml/__init__.py

    r331 r336  
    105105        canonical=None, indent=None, width=None, 
    106106        allow_unicode=None, line_break=None, 
    107         encoding='utf-8', explicit_start=None, explicit_end=None, 
     107        encoding=None, explicit_start=None, explicit_end=None, 
    108108        version=None, tags=None): 
    109109    """ 
     
    113113    getvalue = None 
    114114    if stream is None: 
    115         stream = io.StringIO() 
     115        if encoding is None: 
     116            stream = io.StringIO() 
     117        else: 
     118            stream = io.BytesIO() 
    116119        getvalue = stream.getvalue 
    117120    dumper = Dumper(stream, canonical=canonical, indent=indent, width=width, 
     
    137140        canonical=None, indent=None, width=None, 
    138141        allow_unicode=None, line_break=None, 
    139         encoding='utf-8', explicit_start=None, explicit_end=None, 
     142        encoding=None, explicit_start=None, explicit_end=None, 
    140143        version=None, tags=None): 
    141144    """ 
     
    145148    getvalue = None 
    146149    if stream is None: 
    147         stream = io.StringIO() 
     150        if encoding is None: 
     151            stream = io.StringIO() 
     152        else: 
     153            stream = io.BytesIO() 
    148154        getvalue = stream.getvalue 
    149155    dumper = Dumper(stream, default_style=default_style, 
Note: See TracChangeset for help on using the changeset viewer.