Skip to content

Infinite Recursion #150

Open
Open

Description

@ottojas

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

Activity

  1. Cabalist commented on Jul 15, 2020

    @Cabalist
    Contributor

    You are appending something to itself.

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

  2. ottojas commented on Jul 16, 2020

    @ottojas
    Author
  3. ottojas commented on Jul 22, 2020

    @ottojas
    Author
  4. ottojas commented on Jul 22, 2020

    @ottojas
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions