jncramp / iniparse

Automatically exported from code.google.com/p/iniparse
Other
0 stars 0 forks source link

Docs are misleading: All variables are 'string' type #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
All of the documentation examples use 'print' to display the results. This
is misleading because it allows you to believe that iniparse is magically
inferring the types of the config file elements. It is not. Everything is a
string, even integer and boolean config variables.

Either the documentation should be updated to reflect this shortcoming, or
the individual config variables should themselves be promoted to objects
with .asint() .asbool(), .asfloat() or .asstring() methods that convert
that variable to the type you actually need, and/or it should perhaps make
an attempt at type inference for basic types.

Original issue reported on code.google.com by td.flatl...@gmail.com on 2 Apr 2010 at 9:31

GoogleCodeExporter commented 8 years ago
iniparse definitely needs better, clearer, and more extensive documentation.  
I'll
modify the existing examples to clarify the types of values.  The types are the 
same
as what you'd get with Python's built-in ConfigParser module.

Original comment by psobe...@gmail.com on 11 Apr 2010 at 4:15

GoogleCodeExporter commented 8 years ago
Testing to see if the update will cause a message to be appear in the
iniparse-commits list (I apparently messed up the mailing list configuration a 
couple
of months ago).

Original comment by psobe...@gmail.com on 14 Apr 2010 at 1:31

GoogleCodeExporter commented 8 years ago
I updated the UsageExamples page to make it clear that everything is a string.

I'll resolve this issue and create a new feature request for batter handling of 
types.

Original comment by psobe...@gmail.com on 17 Apr 2010 at 7:07