A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-October/049168.html below:

[Python-Dev] ConfigParser patches

[Python-Dev] ConfigParser patches [Python-Dev] ConfigParser patchesRaymond Hettinger python at rcn.com
Fri Oct 1 22:07:44 CEST 2004
[David Goodger]
> In Python 2.3 and earlier,
> ConfigParser implicitly allowed non-string values to be set.
> http://python.org/sf/810843 asked for clarification, and in rev 1.65
> an explicit type check was added that raises TypeError.

Instead of an explicit type check, it may be better to wrap the
interpolation step in a try/except.  For non-string objects, raise a
TypeError with an informative error message.  This would meet the OP's
need for an informative error message while leaving the module backwards
compatible for internal uses of ConfigParser.  

Ideally, the docs should discourage further non-string uses and advise
that ConfigParser will be string only for Py3.0.



Raymond

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4