Git Product home page Git Product logo

Comments (9)

exarkun avatar exarkun commented on May 23, 2024 1

Merely changing that string to a unicode literal will break usage like color(encoded_utf8_bytes) though. Really, "bytes or unicode" is not a happy type to have to work with.

from cuvner.

meejah avatar meejah commented on May 23, 2024

Hmm, looks like https://github.com/jonathaneunice/colors/blob/master/colors/colors.py#L109 should be a unicode literal to work properly on Python2?

from cuvner.

exarkun avatar exarkun commented on May 23, 2024

Seems plausible - but the docstring for color makes it unclear whether the function is meant to operate on bytes or unicode.

from cuvner.

exarkun avatar exarkun commented on May 23, 2024

otoh, reading the return docs suggests yes it should work on unicode.

from cuvner.

meejah avatar meejah commented on May 23, 2024

Looks to me like this was unintended fallout from this commit: jonathaneunice/colors@67dd97f#diff-3358adf77afc6138373d66e0d18cd3b6L101

...because: str + unicode + str will be a unicode, but str.format(unicode) will not be...

from cuvner.

meejah avatar meejah commented on May 23, 2024

"Yes" to your last comment. Hmm... I'll file an issue on colors and see what we come up with? But this will just not work, ever: "something {}".format(u"\u258f") and yeah the docstring says I should be able to give it a unicode string and get a unicode back...

from cuvner.

meejah avatar meejah commented on May 23, 2024

Hmm, maybe @jonathaneunice can comment here? It seems colors isn't using the github bugtracker (and I don't see any other thing being used).

from cuvner.

meejah avatar meejah commented on May 23, 2024

I guess for now I can pin cuvner to 1.0.2

from cuvner.

meejah avatar meejah commented on May 23, 2024

Okay, I did that and released 17.3.0

from cuvner.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.