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

Andrew McNamara andrewm at object-craft.com.au
Mon Feb 17 00:17:23 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.

PyArg_PTAK was originally used, but really isn't well suited to what we're
trying to do, and ends up raising obscure errors of it's own (or, more to
the point, goes subtly wrong without warning the user).

Giving the C DialectType a setattr which does the input validation is
probably the better answer.

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


More information about the Csv mailing list