Commit Graph

61 Commits

Author SHA1 Message Date
Lukasz Forynski 540e913b71 Merge pull request #15 from cottsay/create-license
Create LICENSE
2016-04-20 11:50:22 +01:00
Scott K Logan 98e2f26646 Create LICENSE 2016-04-19 14:45:38 -07:00
Lukasz Forynski 65dd1eaf80 Update version before creating PyPi packages 2015-09-20 20:37:00 +01:00
Lukasz Forynski 7cbb492608 Merge pull request #13 from electrofelix/support_key_in_dict
Allow checking if key in dict
2015-09-16 18:41:39 +01:00
Darragh Bailey 8c86f42f79 Allow checking if key in dict
Support the common pythonic idiom of checking if a key is in a
dictionary using 'in'.

Fixes #12
2015-09-01 23:53:42 +01:00
Lukasz Forynski 46b456199e Fix error introduced with #10: Fix __delitem__ to remove reference from given key 2015-04-23 22:00:11 +01:00
Lukasz Forynski bfda636ce8 Merge pull request #10 from StephenKappel/master
Fix __delitem__ to remove reference from given key
2015-04-23 21:56:09 +01:00
Lukasz Forynski d71f2404c6 Attempt to fix version check so that it was compatible with 2.6 2015-03-22 21:24:15 +00:00
Lukasz Forynski f4c12e4d24 Merge pull request #9 from jsbueno/issue7
Merge pull request #9 from @jsbueno

These commits refactor the "items" method so that items and iteritems have the same behavior and make the key for a given item predictable in case of "items" listing.

Some tests that incorrectly relied on the order of yielded items where also fixed.
2015-03-22 21:17:33 +00:00
Joao S. O. Bueno 763e5e1078 Stops using OrderedDict: restores Python 2.6 compatibility 2015-03-19 14:10:09 -03:00
Joao S. O. Bueno 46d60d44a9 API change:index(str) now always return a tuple for "key" - fixes #7 2015-03-19 14:07:44 -03:00
Stephen Kappel 659ba81680 added test that would fail prior to bc72b26c4f 2015-03-18 15:56:09 -04:00
Stephen Kappel 2447371d26 Replace tabs with spaces 2015-03-18 15:38:57 -04:00
Stephen Kappel bc72b26c4f Fix __delitem__ to remove reference from given key
Previously, the __delitem__ method deleted the value and references from
other keys, but did not remove the reference from the given key. This
would cause the has_key method to incorrectly indicate that the key was
present - even after it had been deleted.
2015-03-18 15:22:58 -04:00
Joao S. O. Bueno 6f0dc223ee fixes #7 : 'items' return always the first key of a given type associated with a value
Internally changes the key-dicts by type to use OrderedDicts.
Therefore, when requesting the items(key_type=str) for a value defined as
   m["abc", "def"] = 123
The returned item will always have the key "abc" for 123, and
never "def". Previous behavior was undefined.

Also changes tests that relied on the return order of
"items": The multi_dict is not expected to work
as an OrderedDict itself, and code should not rely on this.
2015-03-18 13:02:38 -03:00
Joao S. O. Bueno 92b2935f20 Minor grammar and whitespace fixes
Refactors 'item' to only be a separate function in Python2
2015-03-18 11:35:22 -03:00
Joao S. O. Bueno 48a4dcb1f8 Refactors 'items' to use 'iteritems'
Fixes 'iteritems' to yield each value just once - as
'items' used to do.
2015-03-18 11:33:53 -03:00
Joao S. O. Bueno 2562efc9af Removes old, duplicate 'has_key' 2015-03-18 10:02:46 -03:00
Lukasz Forynski ce4d00deb9 updated setup.py for compatibility with rpm dist creation 2014-12-13 12:21:31 +00:00
Lukasz Forynski 8c1bd6936b Update README.md 2014-11-22 22:50:08 +00:00
Lukasz Forynski 0b47ae5c03 Incremented minor version: to mark (and publish) the repository move on PyPi. 2014-11-22 22:21:54 +00:00
Lukasz Forynski 9d314f19d2 final post-split cleanup 2014-11-22 22:18:00 +00:00
Lukasz Forynski 9d818c5674 moved multi_key_dict to root 2014-11-22 21:59:30 +00:00
Lukasz Forynski 693fde3cb6 clean-up: removed temp files committed by mistake 2014-11-20 20:38:33 +00:00
Lukasz Forynski 55894f25cb Update .travis.yml
Added python 3.2 version
2014-10-26 12:27:49 +00:00
Lukasz Forynski ef304238c7 Updated to add support for python3 2014-10-26 02:23:52 +00:00
Lukasz Forynski bd6d0ae461 removed uninentionally added print statements 2014-10-25 13:23:15 +01:00
Lukasz Forynski 6bca4779de Trying to add project to Travis CI: 2014-07-27 22:18:46 +01:00
Lukasz Forynski 8f6de82fbd updated multi key dict: removed reverse-lookup for other keys 2014-05-19 21:53:15 +01:00
Lukasz Forynski 5349da8204 added constructor allowing to create dict using mapping or iterable 2014-05-07 22:39:31 +01:00
Lukasz Forynski 3daf64f5af increased version in setup.py 2013-12-17 21:45:04 +00:00
Lukasz Forynski a7b8783c66 fixed test for __str__ that was assuming a certain order of keys etc. 2013-12-17 21:42:58 +00:00
Lukasz Forynski d8592c562b increased version 2013-11-13 23:29:23 +00:00
Lukasz Forynski d9fc027a24 fixed __str__ wich was missing quotes for str items. Also updated few tests 2013-11-13 23:28:52 +00:00
Lukasz Forynski 589a0f88d6 'slightly' optimised searching for other keys implemented recently 2013-11-13 13:33:04 +00:00
Lukasz Forynski bb6e512710 increased version 2013-11-13 00:17:42 +00:00
Lukasz Forynski 7fdf6a6402 fix for datetime.datetime.now() doesn't work as a key 2013-11-13 00:17:09 +00:00
Lukasz Forynski 74646072f7 updated setup before distributing new version 2013-09-24 22:18:19 +01:00
Lukasz Forynski 3193bb8c21 fixed bug for keys containing ':' and added __str__ 2013-09-24 22:14:53 +01:00
Lukasz Forynski 851f1d0612 removed condition that would always resolve to 'true' 2013-09-03 22:59:19 +01:00
Lukasz Forynski 07dff2e2ba fixed a bug in __setitem__ 2013-09-01 02:56:38 +01:00
Lukasz Forynski cc79d66879 increased version number in setup.py 2013-09-01 02:19:03 +01:00
Lukasz Forynski 310c7d5741 merged pull-request from jaman: [Added in basic dict attribute/method 'get'] 2013-09-01 01:53:45 +01:00
Lukasz Forynski 74fcc38b8f Merge branch 'master' of https://github.com/formiaczek/python_data_structures 2013-09-01 01:38:59 +01:00
Lukasz Forynski 045d3cc5ca updated __setitem__ to allow for update items using multiple keys 2013-09-01 01:38:30 +01:00
Jarius Jenkins f561db1423 Added in basic dict attribute/method 'get' which supports default return values or None 2013-08-26 08:40:39 +09:00
Lukasz Forynski 83b3515535 Delete commands.txt 2013-08-15 23:59:34 +01:00
Lukasz Forynski d27da38aa7 restructured to match distribution profile 2013-08-15 23:58:45 +01:00
Lukasz Forynski 1b7b32d4e2 cosmetic changes mostly to description/doc 2013-06-26 01:33:29 +01:00
Lukasz Forynski c174c03f4c renamed file 2013-06-24 21:20:44 +01:00