We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems like addVariable is intended to support using a subclass of Domain as a domain. However, this logic:
if hasattr(domain, "__getitem__"): domain = Domain(domain) elif isinstance(domain, Domain): domain = copy.copy(domain)
will always convert to a Domain, since Domain objects implement __getitem__. It would appear that replacing it with this code would fix it:
__getitem__
if isinstance(domain, Domain): domain = copy.copy(domain) elif hasattr(domain, "__getitem__"): domain = Domain(domain)
The text was updated successfully, but these errors were encountered:
Hi @WillDHB
PR with tests are always welcome
Kind regards
Sorry, something went wrong.
[Fix python-constraint#50] Fix support for using a Domain subclass
22dbd39
Done. Sorry the code in the bug report was mangled; I didn't notice until just now.
e23fe98
To avoid code to be mangled, you just need triple backtick (see my edit)
No branches or pull requests
It seems like addVariable is intended to support using a subclass of Domain as a domain. However, this logic:
will always convert to a Domain, since Domain objects implement
__getitem__
. It would appear that replacing it with this code would fix it:The text was updated successfully, but these errors were encountered: