[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] A few questions about the format of variables (classads) and their values when using the python bindings

2015-07-28 11:20 GMT-04:00 Jose Caballero <jcaballero.hep@xxxxxxxxx>:
>> The ClassAd library will automatically cast basic literals (strings, integers, floats, booleans, lists, dictionaries) from python to ClassAds.
> This may be very relevant too.
> Does that mean that I can pass the value of variables like maxWallTime
> both as 960 (int) and as "960" (string), and in both cases the
> classAds will handle it properly?
> I know that the C++ Condor Code handles everything as 'const char *' anyways...
> Cheers,
> Jose

I think I can now answer myself, and I guess the answer is actually "no".
If I understand what I am reading, python bindings use the function
convert_python_to_exprtree( ) to parse the first input to
classad.ClassAd( ). This function calls MakeLiteral( ) in
classad/literals.cpp, which indeed notices when the input is or not a
number, and acts accordingly. Right?