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

Add on list should be possible #26

Open
phorward opened this issue Sep 5, 2023 · 0 comments
Open

Add on list should be possible #26

phorward opened this issue Sep 5, 2023 · 0 comments
Labels
bug Something isn't working logics-js logics-py

Comments

@phorward
Copy link
Member

phorward commented Sep 5, 2023

Adding e.g. an int to a list is currently failing. It should be handled like in LeopoldWichtel@4308c2d

>>> logics.Value([1,2,3]) + 4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/logics/logics-py/logics/value.py", line 221, in __add__
    return Value(int(self) + int(other))
                 ^^^^^^^^^
  File "/tmp/logics/logics-py/logics/value.py", line 138, in __int__
    return int(self.value)
           ^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
>>>

Generelly, an Exception shall not be thrown in this case.

@phorward phorward added bug Something isn't working logics-py logics-js labels Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logics-js logics-py
Projects
None yet
Development

No branches or pull requests

1 participant