Skip to content

Str.s is always unicode when string mode is unspecified #6

@trotterdylan

Description

@trotterdylan

In Python 2.x I would expect string literals without a mode specifier (i.e. not u'foo' or b'foo') to be type str. They always seem to be unicode:

>>> type('foo')
<type 'str'>
>>> type(pythonparser.parse('"foo"\n').body[0].value.s)
<type 'unicode'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions