Python Forum
How Do I Determine indentation in AST?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Do I Determine indentation in AST?
#4
(Jul-01-2018, 02:14 PM)jimo Wrote: How do I determine the indentation in general?
(Jul-01-2018, 04:03 PM)jimo Wrote: but I am attempting to write a docstring generation tool where I would either generate docstrings from scratch or add more documentation to existing docstrings

Probably I don't understand your question/goal. The document PEP257 describes the convention of how spaces are handled. If you want to blend your text/addition into existing docstring you certainly should take this into account. Otherwise your addition will be displaced compared to the rest of the docstring
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
How Do I Determine indentation in AST? - by jimo - Jul-01-2018, 02:14 PM
RE: How Do I Determine indentation in AST? - by buran - Jul-01-2018, 04:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to determine pen color from an image? robie972003 2 2,414 Mar-24-2019, 10:06 PM
Last Post: robie972003
  determine if an number is in a list Dbeah 7 3,825 Nov-06-2018, 12:11 PM
Last Post: buran
  determine if an number is in a list Dbeah 1 2,268 Nov-04-2018, 04:50 PM
Last Post: stullis
  how to determine if an object is a number Skaperen 6 4,050 Jul-11-2018, 08:18 PM
Last Post: Skaperen
  Determine whether a method was overridden porton 6 6,165 Nov-14-2016, 09:51 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020