Skip to content

Example in docs wrong #1

@jonathaneunice

Description

@jonathaneunice

Was just fiddling with the cssselect 0.2 package from PyPI. Noticed that the docs
claim a result that doesn't appear to be current/correct. In docs:

>>> from cssselect import css_to_xpath
>>> exrpession = css_to_xpath('div.content')
>>> exrpession
"descendant-or-self::div[contains(concat(' ', normalize-space(@class), ' '), ' content ')]"

What I got:

u"descendant-or-self::div[@class and contains(concat(' ', normalize-space(@class), ' '), ' content ')]"

(Differences: The u for unicode string and @class and expression.)

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