Skip to content

Commit e2194b2

Browse files
authored
docs/pyinterop.rst: refine, + correct class-var reference (#1264)
1 parent 0464eed commit e2194b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/pyinterop.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ References to Python module top-level members are as expected, with the namespac
131131
src.boo/global-var ;; => "boo"
132132
src.boo/BooClass ;; => <class 'test.BooClass'>
133133
134-
;; top-level callables within the module can be called as you would a standard Basilisp function call
134+
;; callables within the module can be called as you would a standard Basilisp function
135135
(src.boo/module-method)
136136
(src.boo/BooClass)
137137
@@ -141,11 +141,13 @@ For referencing members within classes, Basilisp expects that you tack on the cl
141141
142142
(import src.boo)
143143
144-
(src.boo.BooClass/class-var) ;; => "BooClass class variable!"
144+
src.boo.BooClass/class-var ;; => "BooClass class variable!"
145145
(src.boo.BooClass/some-class-method) ;; => "hello from <class 'src.test.BooClass'>!"
146146
147147
Notice that for these cases the class (name) effectively becomes a namespace of its own, even if it is not defined in a separate file. This is unlike Clojure.
148148

149+
If it helps, you can think of Basilisp's style of referencing as "Python-style", but with the last ``.`` replaced by a ``/``.
150+
149151
.. _accessing_object_methods_and_props:
150152

151153
Accessing Object Methods and Properties

0 commit comments

Comments
 (0)