Merge branch 'master' into master
This commit is contained in:
commit
05cfe89dd9
1
AUTHORS
1
AUTHORS
@ -75,4 +75,5 @@
|
||||
* Sergey Sobko <s.sobko@profitware.ru>
|
||||
* Philip Xu <pyx@xrefactor.com>
|
||||
* Charles de Lacombe <ealhad@mail.com>
|
||||
* John Patterson <john@johnppatterson.com>
|
||||
* Kai Lüke <kailueke@riseup.net>
|
@ -477,6 +477,11 @@ like::
|
||||
"""
|
||||
return self.x
|
||||
|
||||
And we might use it like::
|
||||
|
||||
bar = FooBar(1)
|
||||
print bar.get_x()
|
||||
|
||||
|
||||
In Hy:
|
||||
|
||||
@ -492,6 +497,19 @@ In Hy:
|
||||
"Return our copy of x"
|
||||
self.x))
|
||||
|
||||
And we can use it like:
|
||||
|
||||
.. code-block:: clj
|
||||
|
||||
(setv bar (FooBar 1))
|
||||
(print (bar.get-x))
|
||||
|
||||
Or using the leading dot syntax!
|
||||
|
||||
.. code-block:: clj
|
||||
|
||||
(print (.get-x (FooBar 1)))
|
||||
|
||||
|
||||
You can also do class-level attributes. In Python::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user