Replies: 1 comment 2 replies
-
There has been a discussion about the more general question of excluding output - ah, here it is: #6252 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was wondering what is the best way to document code examples such that they are nicely rendered in the docs later. I use pycharm and I think also generally, code examples are indicated with ">>>" in the doc string. This plays along with the code snippet / syntax highlighting such that the snippet can get copied. However, the ">>>" are also copied which makes copy & paste of example code a bit annoying. Is there a way to disable the ">>>" from being copied? Omitting them is nicer for copy and paste but will make the output in the provided example to look like code. Any good solution for this? Just FYI: On GitHub it also does copy the ">>>".
Here a practical example of what I mean:
Typical way to document an example (at least to the best of my knowledge):
Alternative (?):
Beta Was this translation helpful? Give feedback.
All reactions