Giter Club home page Giter Club logo

python-boolean's People

Contributors

hgomersall avatar pfuntner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-boolean's Issues

Unicode boolean variables not handled?

I ran into an issue where I was supplying boolean variables in a list of unicode strings but they weren't being processed up properly by parse_boolean_function_string().

In [13]: func = parse_boolean_function_string('blah', [u'blah'])

In [14]: func
Out[14]: u'blah'

In [15]: func = parse_boolean_function_string('blah', ['blah'])

In [16]: func
Out[16]: <function psirt_utils.python_boolean.logic.<lambda>>

In [17]:

It's easy enough for me to turn the unicode strings into regular strings but is this working as designed? I wasted a bit of debugging trying to figure out what's wrong. I'm used to Python and packages not caring much about the difference between a string and a unicode string. Python thinks strings and unicode strings with the same data are equal:

In [17]: u'blah' == 'blah'
Out[17]: True

I suspect python-boolean is looking at the types and doesn't treat string and unicode the same.

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.