Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

.pick ignores quality? #34

@mrkurt

Description

@mrkurt

I'm trying to use incoming HTTP headers to serve up the most appropriate translation of a site, and it seems like .pick is exactly what I need, but it's not respecting the quality value of headers. When I run this:

parser.pick(["en", "nl"], "en-GB,nl;q=0.5"

I would expect it to return en, but it's giving me nl. Is this on purpose or would you like a PR to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions