# HG changeset patch # User fsavard # Date 1268323722 18000 # Node ID 02d9c1279dd81e818ff37ca227ecca6ae12a738c # Parent e172ef73cdc5c7d9aa7c0547d4cc8777d439094c Encore quelques typechecks à SeriesTables. diff -r e172ef73cdc5 -r 02d9c1279dd8 utils/seriestables/series.py --- a/utils/seriestables/series.py Thu Mar 11 10:48:54 2010 -0500 +++ b/utils/seriestables/series.py Thu Mar 11 11:08:42 2010 -0500 @@ -39,6 +39,8 @@ int_constructor = "tables.Int64Col" if int_width == 32: int_constructor = "tables.Int32Col" + elif not int_width in (32, 64): + raise "int_width must be left unspecified, or should equal 32 or 64" toexec = "" @@ -89,6 +91,8 @@ float_constructor = "tables.Float32Col" if float_width == 64: float_constructor = "tables.Float64Col" + elif not float_width in (32, 64): + raise "float_width must be left unspecified, or should equal 32 or 64" for n in float_names: toexec += "\t" + n + " = " + float_constructor + "(pos=" + str(pos) + ")\n" @@ -366,7 +370,8 @@ self._buffer = [] # The >= case should never happen, except if lists - # were appended, which should be a red flag. + # were appended by accessing _buffer externally (when it's + # intended to be private), which should be a red flag. assert len(self._buffer) < self.reduce_every # Outside of class to fix an issue with exec in Python 2.6.