writing python doctests
Asked by
reckoner
I would like a snippet to behave as shown:
>>> for i in range(3):
... print i
... print i*2
But the number of lines contained in the block can be arbitrary and there can be nested blocks such as
>>> for i in range(3):
... if i>0:
... print i
I am writing a lot of doctests in RST and this would help me a lot, especially with the nested indenting.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask reckoner for more information if necessary.
To post a message you must log in.