Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�t�c@s�ddlZddlZddlmZd�Zee_xUeejj��D]>Zej	dd�Z
ejej	dd�Zeeje
<qPWejZ
d�Zee_edkr�ddlZej�ndS(i�N(tNumbercCs�t|t�r||St|t�r;|jdd�}nt|t�r_|jdd�}nt|t�r�g}x?|D]7}t|t�r�|jdd�}n|j|�q{Wt|�}n||}|jdd�S(s\Custom implementation of a formatter for bytestrings.

    This function currently relies on the string formatter to do the
    formatting and always returns bytes objects.

    >>> bytesformatter(20, 10)
    0
    >>> bytesformatter('unicode %s, %s!', ('string', 'foo'))
    b'unicode string, foo!'
    >>> bytesformatter(b'test %s', 'me')
    b'test me'
    >>> bytesformatter('test %s', 'me')
    b'test me'
    >>> bytesformatter(b'test %s', b'me')
    b'test me'
    >>> bytesformatter('test %s', b'me')
    b'test me'
    >>> bytesformatter('test %d: %s', (1, b'result'))
    b'test 1: result'
    sutf-8tsurrogateescape(t
isinstanceRtbytestdecodettupletappendtencode(tformattargstnewargstargtret((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pytbytesformatters

sutf-8RcCst|t�r|St|�S(N(Rtinttorigord(tchar((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pytfakeord?st__main__(tostbuiltinstnumbersRR
tlisttenvirontkeystkeyRtbkeytbvaluetordRRt__name__tdoctestttestmod(((s8/sys/lib/python2.7/site-packages/mercurial/py3kcompat.pyt<module>s	)				

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.