Skip to content

refactor(FloorplanToBlenderLib): Optimize flatten function for improved iteration safety#45

Open
fengcunhan wants to merge 1 commit intogrebtsew:masterfrom
fengcunhan:master
Open

refactor(FloorplanToBlenderLib): Optimize flatten function for improved iteration safety#45
fengcunhan wants to merge 1 commit intogrebtsew:masterfrom
fengcunhan:master

Conversation

@fengcunhan
Copy link

  • Rewrite the flatten function as flatten_iterative_safe
  • Use an explicit stack instead of recursion to avoid recursion depth issues caused by deeply nested lists
  • Add handling for non-list elements to improve the function's robustness
  • Optimize function naming to more accurately reflect the function and implementation

…ed iteration safety

- Rewrite the flatten function as flatten_iterative_safe
- Use an explicit stack instead of recursion to avoid recursion depth issues caused by deeply nested lists
- Add handling for non-list elements to improve the function's robustness
- Optimize function naming to more accurately reflect the function and implementation
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

Successfully merging this pull request may close these issues.

1 participant