Thoughts about Python

Joe Mason joe at
Wed Feb 25 06:31:16 CET 2004

In article <c1gtlk$1iaul2$1 at>, Greg Ewing (using wrote:
> Having used other languages where dictionary keys have to
> be strings, I very much like the fact that I *don't* have to
> do this in Python. Uniquely deriving a string from a non-flat
> data structure is fraught with difficulties (e.g. in your example,
> what if one of the list elements contains "::"? Or what if you
> wanted to stringify [42, "elephant", myFunkyClassInstance]?) You
> end up having to carefully design a stringifying scheme for each
> particular case. It's a big can of hassles that I can do without.

TCL-style strings provice a good universal escaping mechanism for this,
as long as you're consistent.


More information about the Python-list mailing list