
Jan. 31, 2013
8 p.m.
On Thu, Jan 31, 2013 at 12:52 AM, Yuval Greenfield <ubershmekel@gmail.com> wrote:
val = getattr(transport, key)
You probably meant val = getattr(transport, "key", None) Your original example also forgot the quotes around "key" in the hasattr() call.) The number of attempts needed to get your example right tells me this is not a good proposal. :-) -- --Guido van Rossum (python.org/~guido)