On Sun, 20 Feb 2005, Steven Bethard wrote:
Erik Max Francis wrote:
Roman Suzi wrote:
I think that if any object (from standard library at least) doesn't support
iteration, it should clearly state so.
My guess is that 'for' causes the use of 'm[0]', which is (rightfully) an
error...
Can this
I was playing with email package and discovrered this strange kind of
behaviour:
import email.Message
m = email.Message.Message()
m['a'] = '123'
print m
From nobody Mon Feb 21 00:12:27 2005
a: 123
for i in m: print i
...
Traceback (most recent call last):
File stdin, line 1, in ?
File
Roman Suzi wrote:
I think that if any object (from standard library at least) doesn't support
iteration, it should clearly state so.
My guess is that 'for' causes the use of 'm[0]', which is (rightfully) an
error...
Can this behaviour of email be considered a bug?
Is there a good case to iterate
Roman Suzi [EMAIL PROTECTED] wrote:
I was playing with email package and discovrered this strange kind of
behaviour:
import email.Message
m = email.Message.Message()
m['a'] = '123'
print m
From nobody Mon Feb 21 00:12:27 2005
a: 123
for i in m: print i
...
Traceback (most recent call