Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The data returned by the list_folders method is a list of three-tuples. #39

Open
wants to merge 3 commits into
base: m
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py3/chapter15/open_imap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def main():
print('Listing mailboxes:')
data = c.list_folders()
for flags, delimiter, folder_name in data:
print(' %-30s%s %s' % (' '.join(flags), delimiter, folder_name))
print(' %-30s%s %s' % ( b' '.join(flags), delimiter, folder_name ) )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I like how your syntax is moving more towards PEP-8. There's just a little extraneous whitespace to clean up and you'll have arrived. (And then you'll just be waiting on me to figure out how to get a test environment running again, and who knows how long that might take me. Alas!)

Copy link
Author

@rstewart2702 rstewart2702 Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the encouragement; this is my first real-live pull request, ever.

I'll pull out the whitespace and push again.

Your book is very helpful, and I'm going to promote it in the "Python and IMAP" article I'm working on.

finally:
c.logout()

Expand Down