Nate Lowrie wrote:
> On Mon, Jun 30, 2008 at 11:21 AM, Paul McNett <[EMAIL PROTECTED]> wrote:
>> For some reason, a prior column.Order is a unicode object, not an int.
>> Try putting this assert in the Column setter:
>>
>> (line 1281)
>>
>> def _setOrder(self, val):
>>   assert isinstance(val, int)
>>
>> and see if that helps us locate what is happening.
>>
> 
> Found it...It is an artifact of the CD storing order as unicode
> objects.  Look at the traceback below.  Order is unicode.  My guess is
> that the translator is not converting it to a string and we don't
> bother to check in _setOrder.  The easiest solution is just to attempt
> to convert the value in _setOrder if it isn't an int.

I guess we could coerce it, no real harm done. However, I think that the 
CD should store it as an int instead of a unicode, but doing such 
automatic coercions would hide such problems and keep them from being 
solved. My inclination is to put in asserts for such situations where we 
expect certain data types, and then fix the discovered problems.

Ed, do you stand solidly on either side here? As usual, I'm your typical 
Democratic waffler and can see both perspectives.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to