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

Infinite Recursion #150

Open
ottojas opened this issue Jul 15, 2020 · 4 comments
Open

Infinite Recursion #150

ottojas opened this issue Jul 15, 2020 · 4 comments

Comments

@ottojas
Copy link

ottojas commented Jul 15, 2020

Hit problem by accident. reduced code to this:

l=[s.sphere(1),s.cube([.5,.6,2])]
l.append(l)
l
[<solid.objects.sphere object at 0x7f55db249eb8>, <solid.objects.cube object at 0x7f55db249f28>, [...]]
sum(l)

.... GIANT SNIP ....
File "/home/otto/.local/lib/python3.7/site-packages/solid/solidpython.py", line 246, in
[self.add(c) for c in child]
File "/home/otto/.local/lib/python3.7/site-packages/solid/solidpython.py", line 246, in add
[self.add(c) for c in child]
File "/home/otto/.local/lib/python3.7/site-packages/solid/solidpython.py", line 246, in
[self.add(c) for c in child]
File "/home/otto/.local/lib/python3.7/site-packages/solid/solidpython.py", line 241, in add
if isinstance(child, (list, tuple)):
RecursionError: maximum recursion depth exceeded while calling a Python object

Regards
Otto

@Cabalist
Copy link
Contributor

You are appending something to itself.

I think this would cause an exception in any python program.

@ottojas
Copy link
Author

ottojas commented Jul 16, 2020 via email

@ottojas
Copy link
Author

ottojas commented Jul 22, 2020 via email

@ottojas
Copy link
Author

ottojas commented Jul 22, 2020 via email

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

2 participants