question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeWriter doesn't work for 'CFuncDefNode'

See original GitHub issue
>>> writer = CodeWriter()

>>> writer.write(TreeFragment("def fn(): \n    pass").root)
<Cython.CodeWriter.LinesResult at 0x121704a90>

>>> writer.write(TreeFragment("cdef fn(): \n    pass").root)
Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/usr/local/lib/python3.7/site-packages/Cython/CodeWriter.py", line 243, in visit_FuncDefNode
    self.startline(u"def %s(" % node.name)
AttributeError: 'CFuncDefNode' object has no attribute 'name'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
scodercommented, Apr 18, 2020

@sighingnow good idea. I just pushed #3528.

0reactions
sighingnowcommented, Apr 19, 2020

good idea. I just pushed #3528.

Thanks a lot! Visitor for some kinds of ast Node are still missing, I will continue to push to #3514 to make the CodeWriter more complete. Will ping you when it ready for review and merging.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Writer App Suggestions and Support - Actipro Software
Post about Code Writer app suggestions, bugs, workarounds, and request support in ... "Compiled languages like java and c++ doesn't work while Compiling, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found