from __future__ import unicode_literals


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)

    print(s)


s = str('foo')  # python2: unicode -> str, python3: str -> str (noop)
do_thing(s)

186df65f57b011bbf7eff491e6d2ea82ebf37b5b
<mask token>


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)
    print(s)


<mask token>

<mask token>


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)
    print(s)


<mask token>
do_thing(s)

<mask token>


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)
    print(s)


s = str('foo')
do_thing(s)

from __future__ import unicode_literals


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)
    print(s)


s = str('foo')
do_thing(s)

from __future__ import unicode_literals


def do_thing(s):
    if not isinstance(s, str):
        raise TypeError(s)

    print(s)


s = str('foo')  # python2: unicode -> str, python3: str -> str (noop)
do_thing(s)
