Skip to content

Commit c83b2ef

Browse files
committed
[GR-50100] Add note about __init__ method in Jython.md
PullRequest: graalpython/3061
2 parents 3bf9c8d + 8c588bd commit c83b2ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/user/Jython.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ logger.warning("Bye")
256256
for record in handler.this.logged:
257257
print(f'Python captured message "{record.getMessage()}" at level {record.getLevel().getName()}')
258258
```
259-
259+
Note: The `__init__` method is called after the Java constructor, so the `self` object is already initialized. As a consequence, the `__init__` method cannot have any parameters other than `self` (any arguments passed while constructing the object are passed to the Java constructor implicitly).
260260
## Embedding Python into Java
261261

262262
The other way to use Jython is to embed it into Java applications.

0 commit comments

Comments
 (0)