Skip to content

Commit

Permalink
update type docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Dec 6, 2016
1 parent 3a72c08 commit 046f5e3
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions senf/_fsnative.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,21 @@ class impl(object):
The real returned type is:
- Python 2 + Windows: :obj:`python:unicode` with ``surrogates``
- Python 2 + Unix: :obj:`python:str`
- Python 3 + Windows: :obj:`python3:str` with ``surrogates``
- Python 3 + Unix: :obj:`python3:str` with ``surrogates`` (only
containing code points which can be encoded with the locale encoding)
- **Python 2 + Windows:** :obj:`python:unicode`, with ``surrogates``,
without ``null``
- **Python 2 + Unix:** :obj:`python:str`, without ``null``
- **Python 3 + Windows:** :obj:`python3:str`, with ``surrogates``,
without ``null``
- **Python 3 + Unix:** :obj:`python3:str`, with ``surrogates``, without
``null``, without code points not encodable with the locale encoding
Constructing a `fsnative` can't fail.
Passing a `fsnative` to :func:`open` can only lead to
`EnvironmentError`, not `ValueError` or `TypeError`.
Passing a `fsnative` to :func:`open` will never lead to `ValueError`
or `TypeError`.
Any operation on `fsnative` can also use the `str` type, as long as
the `str` only contains ASCII and no NULL.
"""

def __new__(cls, text=u""):
Expand Down

0 comments on commit 046f5e3

Please sign in to comment.