This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rosuav
Recipients Rosuav
Date 2014-02-22.12:45:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Only noticed because I was searching the stdlib for hasattr calls, but in mailbox.Mailbox.update(), a check is done thus:

        if hasattr(arg, 'iteritems'):
            source = arg.items()
        elif hasattr(arg, 'items'):
            source = arg.items()
            source = arg

If this is meant to support Python 2, it should probably use iteritems() in the first branch, but for Python 3, it's probably simpler to just drop the first check altogether:

        if hasattr(arg, 'items'):
            source = arg.items()
            source = arg

Or possibly switch to EAFP:

            source = arg.items()
        except AttributeError:
            source = arg
Date User Action Args
2014-02-22 12:45:39Rosuavsetrecipients: + Rosuav
2014-02-22 12:45:39Rosuavsetmessageid: <>
2014-02-22 12:45:39Rosuavlinkissue20729 messages
2014-02-22 12:45:38Rosuavcreate