mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-10 10:33:16 +01:00
b31247c354
Message().get_filenames() will return a generator that allows to iterator over the recorded filenames for a certain Message. Do ntoe that as all generators, these are one-time use only. You will have to reget them to perform various actions. So this works:: len(Message().get_filenames()) list(Message().get_filenames()) for n in Message().get_filenames(): print n But this won't:: names = Message().get_filenames() len(names) #uses up the iterator list(names) #outch, already used up... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> |
||
---|---|---|
.. | ||
go | ||
python | ||
ruby |