{"action":"created","issue":{"url":"https://api.github.com/repos/pybee/batavia/issues/46","repository_url":"https://api.github.com/repos/pybee/batavia","labels_url":"https://api.github.com/repos/pybee/batavia/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/pybee/batavia/issues/46/comments","events_url":"https://api.github.com/repos/pybee/batavia/issues/46/events","html_url":"https://github.com/pybee/batavia/issues/46","id":147999017,"number":46,"title":"Complete implementation of operations on standard types","user":{"login":"freakboy3742","id":37345,"avatar_url":"https://avatars.githubusercontent.com/u/37345?v=3","gravatar_id":"","url":"https://api.github.com/users/freakboy3742","html_url":"https://github.com/freakboy3742","followers_url":"https://api.github.com/users/freakboy3742/followers","following_url":"https://api.github.com/users/freakboy3742/following{/other_user}","gists_url":"https://api.github.com/users/freakboy3742/gists{/gist_id}","starred_url":"https://api.github.com/users/freakboy3742/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freakboy3742/subscriptions","organizations_url":"https://api.github.com/users/freakboy3742/orgs","repos_url":"https://api.github.com/users/freakboy3742/repos","events_url":"https://api.github.com/users/freakboy3742/events{/privacy}","received_events_url":"https://api.github.com/users/freakboy3742/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pybee/batavia/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/pybee/batavia/labels/first-timers-only","name":"first-timers-only","color":"f9d0c4"},{"url":"https://api.github.com/repos/pybee/batavia/labels/up-for-grabs","name":"up-for-grabs","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":43,"created_at":"2016-04-13T09:21:55Z","updated_at":"2016-07-15T03:16:31Z","closed_at":null,"body":"Javascript has a specific set of allowed operator and operations. Python has a set of operators and operations as well. However, the two don't match exactly. For example, Javascript behavior for adding/multiplying with Strings leads to behaviour that is quite distinct to the behavior provided by Python.\r\n\r\nIn order to replicate Python behavior in Javascript, Python's logic for all the basic operations needs to be implemented in the Batavia support library.\r\n\r\nThe test suite contains around 2800 tests in the that are currently marked as \"expected failures\". These reflect an attempt to do \"every operation between every base data type\". The task: pick a data type, and write the implementation of one of the math operation or comparison operators.\r\n\r\nThe tests will pass (and become unexpected successes) when the output of Python code doing that operation is the same when run through CPython and Batavia - and I mean byte-identical, down to the text and punctuation of the error message if appropriate.\r\n\r\nIf you want to see an example of what is involved, check out the implementation of add for integers. If you have an int, Python will allows you to add an int or a float to it; all other types raise a TypeError. The list of operations on int that still need to be implemented can be found here; if you add a new operation, delete the line that corresponds to that test, and the test will report as a pass, rather than an expected fail."},"comment":{"url":"https://api.github.com/repos/pybee/batavia/issues/comments/232850340","html_url":"https://github.com/pybee/batavia/issues/46#issuecomment-232850340","issue_url":"https://api.github.com/repos/pybee/batavia/issues/46","id":232850340,"user":{"login":"freakboy3742","id":37345,"avatar_url":"https://avatars.githubusercontent.com/u/37345?v=3","gravatar_id":"","url":"https://api.github.com/users/freakboy3742","html_url":"https://github.com/freakboy3742","followers_url":"https://api.github.com/users/freakboy3742/followers","following_url":"https://api.github.com/users/freakboy3742/following{/other_user}","gists_url":"https://api.github.com/users/freakboy3742/gists{/gist_id}","starred_url":"https://api.github.com/users/freakboy3742/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freakboy3742/subscriptions","organizations_url":"https://api.github.com/users/freakboy3742/orgs","repos_url":"https://api.github.com/users/freakboy3742/repos","events_url":"https://api.github.com/users/freakboy3742/events{/privacy}","received_events_url":"https://api.github.com/users/freakboy3742/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T03:16:31Z","updated_at":"2016-07-15T03:16:31Z","body":"Interesting - I can confirm that I'm seeing the same problem. There are some tests for set creation behavior, but evidently they're not sophisticated enough.\r\n\r\nSo - it would appear that Batavia's set implementation needs some work :-)\r\n\r\nModifying the implementation of Batavia's Set so that it extends JavaScript's Set sounds like a fine idea to me. However, we can't just drop in Javascript's set, because Batavia needs to piggyback some extra methods onto the type, and modifying the builtin type isn't desirable. String and Boolean modify the base type, but only because the benefits of being able to use primitives outweighs the benefits of keeping the core types pure."}}
{"actor":{"display_login":"freakboy3742"}}