Andrew Dalke's space example (was Re: [Csv] csv)

Andrew McNamara andrewm at object-craft.com.au
Mon Feb 17 00:44:22 CET 2003


>>> PyArg_PTAK gives a more meaningful message if the required type is
>>> a single char, for example "argument 2 must be char, not
>>> int". However where the required type is int, you get "an integer
>>> is required" ... looks like a patch wouldn't go astray.
>
>Andrew> PyArg_PTAK was originally used, but really isn't well suited
>Andrew> to what we're trying to do, and ends up raising obscure errors
>Andrew> of it's own (or, more to the point, goes subtly wrong without
>Andrew> warning the user).
>
>Andrew> Giving the C DialectType a setattr which does the input
>Andrew> validation is probably the better answer.
>
>Does that mean that the validation is only on individual attributes,
>not on the set of attributes?

Yep - at the moment there are no inter-attribute checks. 

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Csv mailing list