Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors dicts to mimic python behavior #41

Closed
wants to merge 13 commits into from
Closed

Refactors dicts to mimic python behavior #41

wants to merge 13 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 18, 2014

This changes the behavior of dicts to mimic python's behavior. Dicts now have their own data array consisting of key/value pairs. Objects are added to an index based on a hash value, and the array will grow when it is 75% full. Items are deleted by replacing them with a dummy object. This results in significantly faster look-ups, and also adds meaning to the hash function.

Unfortunately, a lot of existing code was coupled with the previous implementation, so the risk of introducing bugs is high. This is exasperated by the fact that I can't seem to get the unit test suite to run properly on my local machine, so there will likely be some clean-up / additional bug fixing required after merging this.

@ghost
Copy link

ghost commented Oct 29, 2014

This Pull Request needs a Re-Sync with the Master (conflicts) 🔍

@ghost
Copy link
Author

ghost commented Dec 3, 2014

Just out of curiosity, where are we on this? The issue was marked as in-progress so it isn't clear if there was already work done to get this merged in or not. I know I was having issues getting the unit tests set up on my machine and just didn't have the spare time to work through that.

@glyph
Copy link
Contributor

glyph commented Feb 2, 2015

Regarding getting unit tests to run on one's local machine - one of the things I'm working on (which is blocked by #121) is a test runner that uses Phantom JS; if Brython itself used this, it would make it possible to run tests on a service integrated with Github, such as Travis CI.

@ghost
Copy link

ghost commented Feb 2, 2015

Glyph,

Can you provide some of the code you are using with Phantom JS? I would to take a look.

@glyph
Copy link
Contributor

glyph commented Feb 2, 2015

@Earney - it doesn't really work yet; there are references to the work in progress on #121 though.

@gst
Copy link

gst commented Feb 16, 2015

looks like it's this now:

yeah I know / have seen.

but I thought this PR / change was WIP or still waiting to be merged, so my comment, but apparently it's not so.

@ghost ghost closed this Feb 16, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants