fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.7K
active users

#docstring

0 posts0 participants0 posts today
Python Rennes<p>saviez-vous qu'il était possible de référencer des images avec la syntaxe <a href="https://social.breizhcamp.org/tags/markdown" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>markdown</span></a> dans la <a href="https://social.breizhcamp.org/tags/docstring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstring</span></a> de code <a href="https://social.breizhcamp.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> ?<br><a href="https://mathspp.com/blog/til/images-in-docstrings" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mathspp.com/blog/til/images-in</span><span class="invisible">-docstrings</span></a></p><p>Vous pouvez ainsi pointer vers des diagrammes, qui apparaîtront dans l'infobulle que vos IDE (<a href="https://social.breizhcamp.org/tags/codium" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>codium</span></a> / <a href="https://social.breizhcamp.org/tags/vsCode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vsCode</span></a> par exemple) affichent au survol de la fonction, méthode ou classe concernée.</p>
multimeric<p>Another new library release: DocStrands lets you re-use segments of your docstrings between functions.</p><p>Copy-pasting docstrings has long frustrated me, so I came up with my own solution!</p><p><a href="https://github.com/multimeric/DocStrands" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/multimeric/DocStran</span><span class="invisible">ds</span></a></p><p><a href="https://genomic.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://genomic.social/tags/docstring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstring</span></a></p>
C.<p>With <a href="https://mindly.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> now being "the most popular programming language" (don't get me started...), the <a href="https://mindly.social/tags/Unicode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Unicode</span></a> consortium has announced a new <a href="https://mindly.social/tags/codepoint" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>codepoint</span></a> specifically to aid Python <a href="https://mindly.social/tags/developers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>developers</span></a> and increase efficiency -- both of time, and of storage.</p><p>The next Unicode release will include a codepoint representing triple double quotes, making <a href="https://mindly.social/tags/docstrings" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstrings</span></a> much easier.</p><p><a href="https://mindly.social/tags/quotes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quotes</span></a> <a href="https://mindly.social/tags/DoubleQuotes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DoubleQuotes</span></a> <a href="https://mindly.social/tags/TripleDoubleQuotes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TripleDoubleQuotes</span></a> <a href="https://mindly.social/tags/docstring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstring</span></a> <a href="https://mindly.social/tags/syntax" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>syntax</span></a> <a href="https://mindly.social/tags/popularity" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>popularity</span></a></p>
Archimage<p>I guess I should spend some time learning Phoenix.</p><p><a href="https://writing.exchange/tags/docstring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstring</span></a> <a href="https://writing.exchange/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
Christophe<p>Someone made a Visual Studio Code extension to highlight docstrings in python ! I needed this soo much :pleading_face_3d: </p><p><a href="https://github.com/rodolphebarbanneau/python-docstring-highlighter" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/rodolphebarbanneau/</span><span class="invisible">python-docstring-highlighter</span></a></p><p><a href="https://toots.niark.nexus/tags/vscode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vscode</span></a> <a href="https://toots.niark.nexus/tags/code" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>code</span></a> <a href="https://toots.niark.nexus/tags/dev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dev</span></a> <a href="https://toots.niark.nexus/tags/editor" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>editor</span></a> <a href="https://toots.niark.nexus/tags/ide" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ide</span></a> <a href="https://toots.niark.nexus/tags/extensions" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>extensions</span></a> <a href="https://toots.niark.nexus/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://toots.niark.nexus/tags/docstring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>docstring</span></a></p>

When #programming, the first thing I write for a new #python #class or #method is the #docstring. (Sorry about all the hashtags, but you did see this.)

Docstrings written this way are expressions of optimism and hope: What it says it does you will soon be able to make it do! It's happened enough times for me to really believe it now. Therein lies a directed, focused burst of creativity.

The alternative: grudging summary of a solution to a problem that might not have been very well defined.

I've been doing some VS Code extension hacking recently (something cool coming soon, possibly!) and I have to say...

It is really a testament to LISP and to the Emacs contributors that docstrings are:
1. a core part of the language
2. are available on nearly every function and command

The best way to even find out if a command _exists_ in VS Code is to open the "keyboard shortcuts" window. And then just guess the args…