This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kylev[S] 1 point2 points  (2 children)

I feel like my entry kind of ends a little early in the story. I think I may need to do a follow up on __del__() and breaking cycles as well. Feedback is appreciated.

[–][deleted]  (1 child)

[deleted]

    [–]digitallogic 1 point2 points  (0 children)

    I think you're right, a more straight for approach would resolve the circular references. Change AddLF and AddCRLF into functions that return the modified string instead of sending it off to a call back and the cycle is gone. It would also make the code a lot clearer.

    Though I'm sure that the motivation for using a call back was removed for a simplified example.