Skip to content

add note about __init__ method in Jython.md #368

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user/Jython.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ logger.warning("Bye")
for record in handler.this.logged:
print(f'Python captured message "{record.getMessage()}" at level {record.getLevel().getName()}')
```

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).
## Embedding Python into Java

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