Project

General

Profile

# Date Author Comment
13392 05/02/2014 10:57 PM Aaron Marcuse-Kubitza

fix: lib/util.py: dict_subset(): raise an error if collections.OrderedDict isn't available, because some callers may depend on this. note that using dict instead of OrderedDict may be the cause of the joining on the wrong columns bug (issue #902).

13361 04/30/2014 06:58 PM Aaron Marcuse-Kubitza

bugfix: lib/util.py: use OrderedDict from collections rather than ordereddict to work with Mac OS X 10.8 Mountain Lion (http://vegpath.org/links/#OrderedDict)

11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

4491 09/06/2012 08:30 PM Aaron Marcuse-Kubitza

Replaced str() with strings.ustr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors

4100 08/17/2012 04:26 PM Aaron Marcuse-Kubitza

util.py: dict_subset(): Fall back to using dict when OrderedDict is not available, in order to support making the maps on nimoy

4083 08/16/2012 06:45 PM Aaron Marcuse-Kubitza

util.py: list_subset(): Fixed bug where using '+' to append the rest of the list didn't work if '+' was the first index, because max() cannot be called on an empty list

3816 08/07/2012 03:23 AM Aaron Marcuse-Kubitza

util.py: list_subset(): Made an index of '+' append the rest of the list

3157 06/29/2012 01:01 AM Aaron Marcuse-Kubitza

util.py: dict_subset(): Use OrderedDict so that order of keys in input dict (if ordered) will be preserved

2652 06/06/2012 06:04 PM Aaron Marcuse-Kubitza

util.py: DefaultDict: Use dicts.DictProxy instead of collections.defaultdict so that it provides a view of the given dict instead of copying it

2375 05/23/2012 06:28 PM Aaron Marcuse-Kubitza

util.py: NamedTuple inherits from objects.BasicObject so that it's comparable and hashable. This fixes a bug in dicts.make_hashable() where the NamedTuple created for a dict would appear to be hashable but would always compare as unequal.

2299 05/22/2012 03:16 PM Aaron Marcuse-Kubitza

util.py: Added class_name()

2254 05/21/2012 05:52 PM Aaron Marcuse-Kubitza

Compare object()-based sentinel values using is. Where sentinel values must be compared using ==, use rand.rand_int() instead.

2020 04/30/2012 11:06 PM Aaron Marcuse-Kubitza

util.py: list_subset(): Added default param to specify the value to use for invalid indexes (if any)

1910 04/19/2012 06:47 PM Aaron Marcuse-Kubitza

util.py: NamedTuple.__iter__(): Removed unnecessary **attrs param

1908 04/19/2012 06:28 PM Aaron Marcuse-Kubitza

util.py: NamedTuple: Made it usable as a hashable dict (with string keys) by adding iter() and getitem()

1785 04/03/2012 06:32 PM Aaron Marcuse-Kubitza

util.py: Added all_equal(), all_equal_ignore_none(), have_same_value()

1767 04/03/2012 03:17 PM Aaron Marcuse-Kubitza

util.py: Added sort_by_len(), shortest(), longest()

1494 03/19/2012 08:31 PM Aaron Marcuse-Kubitza

util.py: list_subset(): Support special idxs value None, which returns entire list

1483 03/19/2012 06:06 PM Aaron Marcuse-Kubitza

util.py: Added coalesce()

1467 03/19/2012 02:55 PM Aaron Marcuse-Kubitza

lib/*.py: Removed svn:executable property to turn execute bit off

1445 03/18/2012 04:13 PM Aaron Marcuse-Kubitza

util.py: Added classes_eq()

1443 03/16/2012 06:23 PM Aaron Marcuse-Kubitza

util.py: Added NamedTuple

1415 03/15/2012 05:35 PM Aaron Marcuse-Kubitza

util.py: Added list_as_length(). Documented that list_set_length() takes a list, not a tuple. Documented that ListDict must have len(list_) == len(keys).

1414 03/15/2012 05:19 PM Aaron Marcuse-Kubitza

util.py: Added list_set_length(). Changed list_set() to use list_set_length().

1373 03/12/2012 03:49 PM Aaron Marcuse-Kubitza

util.py: none_if(): Allow multiple none_vals using varargs

1359 03/11/2012 05:12 PM Aaron Marcuse-Kubitza

util.py: Added do_ignore_none()

1344 03/09/2012 07:39 PM Aaron Marcuse-Kubitza

util.py: Added list_replace()

1281 03/05/2012 04:09 PM Aaron Marcuse-Kubitza

util.py: Added list_set() and list_setdefault()

1233 03/02/2012 06:53 PM Aaron Marcuse-Kubitza

util.py: Added all_not_none() and bool2str()

1178 02/27/2012 03:47 PM Aaron Marcuse-Kubitza

util.py: ListDict: str(): Print each entry on its own line, in the order the keys were provided

1147 02/25/2012 08:00 PM Aaron Marcuse-Kubitza

util.py: Added WrapIter to wrap an iterator and ListDict to view a list as a dict

1145 02/25/2012 07:37 PM Aaron Marcuse-Kubitza

util.py: Added list_flip()

1068 02/21/2012 01:27 PM Aaron Marcuse-Kubitza

util.py: Added DefaultDict to wrap collections.defaultdict with a simple value passed in the constructor, defaulting to None. Added dict_subset_right_join() to fill in None for subset keys that don't exist.

1046 02/18/2012 03:22 PM Aaron Marcuse-Kubitza

util.py: Fixed cast() to not cast a subclass to a superclass (which doesn't make sense in a dynamically-typed language). Added none_if().

1045 02/18/2012 02:50 PM Aaron Marcuse-Kubitza

util.py: Removed locale import since it's no longer used by util

1012 02/14/2012 06:52 PM Aaron Marcuse-Kubitza

util.py: Added list_eq_is() to compare two lists using is

1008 02/14/2012 05:21 PM Aaron Marcuse-Kubitza

util.py: Added list_get()

1007 02/14/2012 05:10 PM Aaron Marcuse-Kubitza

util.py: Added is_list()

989 02/14/2012 02:36 PM Aaron Marcuse-Kubitza

Moved value to string conversion functions infrom util.py to new module format.py

987 02/14/2012 02:32 PM Aaron Marcuse-Kubitza

util.py: Added int2str()

980 02/14/2012 02:03 PM Aaron Marcuse-Kubitza

util.py: Added basic to_si() to add SI prefix to value

979 02/14/2012 01:02 PM Aaron Marcuse-Kubitza

util.py: Added format_str() to use locale-specific formatting settings, including thousands separator. Use it in to_percent().

976 02/14/2012 12:47 PM Aaron Marcuse-Kubitza

util.py: Added to_percent()

934 02/11/2012 06:02 PM Aaron Marcuse-Kubitza

util.py: Added list_subset()

931 02/11/2012 05:40 PM Aaron Marcuse-Kubitza

util.py: Added function wrappers for statements noop() and and_()

836 02/04/2012 04:14 PM Aaron Marcuse-Kubitza

util.py: Added cast() to cast a value while passing None through

795 02/03/2012 11:57 AM Aaron Marcuse-Kubitza

util.py: Don't print type name in ConstraintError message because sometimes an entry tuple (e.g. from a dict) is checked, and then the type isn't useful

791 02/03/2012 11:48 AM Aaron Marcuse-Kubitza

util.py: Added is_str() and CheckedIter

467 01/11/2012 02:22 PM Aaron Marcuse-Kubitza

util.py: Fixed dict_subset() to work correctly when a key does not exist

466 01/11/2012 02:13 PM Aaron Marcuse-Kubitza

util.py: Added dict_subset()

341 01/03/2012 01:13 PM Aaron Marcuse-Kubitza

util.py: Added type_name()

330 12/29/2011 12:58 PM Aaron Marcuse-Kubitza

util.py: Changed rename_key() not to suppress KeyError, since some callers might want to assert that a key exists

268 12/22/2011 06:39 PM Aaron Marcuse-Kubitza

Moved everything in scripts to root. inputs_Makefile: Don't run "all" when installing.

135 12/12/2011 03:34 PM Aaron Marcuse-Kubitza

map: Implemented DB input support for querying a single table

133 12/09/2011 05:35 PM Aaron Marcuse-Kubitza

map: Continued to add DB input support

131 12/09/2011 04:02 PM Aaron Marcuse-Kubitza

Added support for multiple database engines. Changed SALVIAS_db input to use user-entered password.

42 11/29/2011 12:31 PM Aaron Marcuse-Kubitza

Moved Python modules to shared lib folder

11 11/17/2011 10:29 AM Aaron Marcuse-Kubitza

Added BIEN 3 scripts