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

ApiOptions.__and__ generates exception in Python3 #20

Closed
baecks opened this issue May 23, 2018 · 0 comments
Closed

ApiOptions.__and__ generates exception in Python3 #20

baecks opened this issue May 23, 2018 · 0 comments

Comments

@baecks
Copy link

baecks commented May 23, 2018

Hello,

In the file options.py, the inplementation of the method and in the class ApiOptions generates an exception in Python3. The reason for this exception is that dict_items can not be added in Py3. The alternative implementation for this method, which is Python 2 and 3 compliant (tested locally) is provided below:

class ApiOptions(dict):
    def __and__(self, other):
        d = self.copy()
        d.update(other)
        return ApiOptions(d)

Could you please apply this fix to the official code repo?

Thanks,
Sven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant