Paul Koning wrote: >>>>>> "Tim" == Tim Roberts <[email protected]> writes: >>>>>> > > > Tim> The string can be converted back to a data structure using eval, > Tim> with appropriate caution. > > How is that different from the builtin function "repr"? >
In this particular case, they happen to produce the same output. If the sample data set were larger, you'd see that pprint adds newlines and white space to make the output line up neatly for human readers, and at the appropriate indentation level. repr just makes one big line. It all depends on what the OP intends to do with the string. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
