Created
March 19, 2012 11:50
-
-
Save lstoll/2108967 to your computer and use it in GitHub Desktop.
Docstrings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clj | |
Clojure 1.3.0 | |
user=> (defn fun "Docstring" [] ()) | |
#'user/fun | |
user=> (meta (var fun)) | |
{:arglists ([]), :ns #<Namespace user>, :name fun, :doc "Docstring", :line 4, :file "NO_SOURCE_PATH"} | |
user=> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python | |
Python 2.7.2 (default, Mar 13 2012, 15:00:06) | |
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def fun(): | |
... """Docstring for fun""" | |
... pass | |
... | |
>>> fun.__doc__ | |
'Docstring for fun' | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment