{"action":"opened","issue":{"url":"https://api.github.com/repos/bastikr/boolean.py/issues/13","repository_url":"https://api.github.com/repos/bastikr/boolean.py","labels_url":"https://api.github.com/repos/bastikr/boolean.py/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/bastikr/boolean.py/issues/13/comments","events_url":"https://api.github.com/repos/bastikr/boolean.py/issues/13/events","html_url":"https://github.com/bastikr/boolean.py/issues/13","id":143456264,"number":13,"title":"Define if a Symbol evaluates to TRUE or FALSE. ","user":{"login":"pombredanne","id":675997,"avatar_url":"https://avatars.githubusercontent.com/u/675997?v=3","gravatar_id":"","url":"https://api.github.com/users/pombredanne","html_url":"https://github.com/pombredanne","followers_url":"https://api.github.com/users/pombredanne/followers","following_url":"https://api.github.com/users/pombredanne/following{/other_user}","gists_url":"https://api.github.com/users/pombredanne/gists{/gist_id}","starred_url":"https://api.github.com/users/pombredanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pombredanne/subscriptions","organizations_url":"https://api.github.com/users/pombredanne/orgs","repos_url":"https://api.github.com/users/pombredanne/repos","events_url":"https://api.github.com/users/pombredanne/events{/privacy}","received_events_url":"https://api.github.com/users/pombredanne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-25T08:43:52Z","updated_at":"2016-03-25T08:43:52Z","closed_at":null,"body":"from @Kronuz in #7:\r\n> Finally, I'm using the Boolean expressions to pass Boolean rules and parsing them (and simplifying them) and then, how do I tell the expression to use certain symbols as True or False to give me end result of the evaluated symbols?\r\n\r\n>I currently added some changes to eval() to be able to pass a mapping of symbols to TRUE/FALSE during the evaluation. eval() received **evalkwargs, which I guessed it was for the purpose of passing that mapping of symbols, as it only seemed intuitive it would, but it didn't do anything with them. Also, once expressions are flagged as canonical, eval() a second time doesn't do anything. So I changed eval() to save the dictionary object in **evalkwargs in a variable so next time I call eval() it returns immediately only if the saved evalkwargs is equal to the passed one (thus it's already been processed under that evalkwargs context as canonical) and I also use the passed evalkwargs in the Symbol's eval() as the symbol mapping to look for the value of symbol, so it returns either TRUE or FALSE, if it's there, or the symbol itself (self), if it's not.\r\n\r\nSo I guess it could be interesting to define if a Symbol is True or False rather than always treating a Symbol as True.\r\n\r\n@Kronuz Could you elaborate on the need for this vs. wrapping such a Symbol in a False expression?"}}