Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33244
| From | "Colin J. Williams" <cjw@ncf.ca> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Error messages from format() |
| Date | 2012-11-13 10:08 -0500 |
| Organization | National Capital Freenet, Ottawa, Ontario, Canada |
| Message-ID | <k7tnqp$4r2$1@theodyn.ncf.ca> (permalink) |
Is there some way to get more informative error messages from the
builtin format?
Most messages are such as:
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ValueError: Invalid conversion specification
This example doesn't point to the first invalid case.
[Dbg]>>> format((25, 31),'{0^9o} a(1:9x}')
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ValueError: Invalid conversion specification
Basically, I'm trying to make use of the format function with Python
3.2, but find little in the way of examples in the docs.
Colin W.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Error messages from format() "Colin J. Williams" <cjw@ncf.ca> - 2012-11-13 10:08 -0500
Re: Error messages from format() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-13 18:38 +0000
Re: Error messages from format() "Colin J. Williams" <cjw@ncf.ca> - 2012-11-13 15:24 -0500
Re: Error messages from format() Dave Angel <d@davea.name> - 2012-11-13 16:18 -0500
Re: Error messages from format() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-13 22:54 +0000
csiph-web