Skip to content

should use python3 unicode in 'blog' demo #2977

Closed
@youguanxinqing

Description

@youguanxinqing

the code blog as follow:

class Application(tornado.web.Application):
    def __init__(self, db):
        ...
        settings = dict(
            blog_title=u"Tornado Blog",
            ...
        )
        super().__init__(handlers, **settings)

Since Python 3.0, the language’s str type contains Unicode characters, meaning any string created using "unicode rocks!", 'unicode rocks!', or the triple-quoted string syntax is stored as Unicode.

ref : the-string-type

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