Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Added simple encapsulation #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

desertkun
Copy link

Python object could have private fields that would be great to have hidden from javascript for security reasons.

That's why this pull requests returns null for every python property starting with _. Same applies to writing/deleting/iterating through object.

class Test(object):
    def __init__(self):
        self.test_a = 1
        self._test_b = 2

Therefore, test_a is accessible, but _test_b is not.

@buffer
Copy link
Owner

buffer commented Jan 30, 2017

Adding @flier to the thread for a fruitful discussion.

PS Moreover it would be great if we all could invest time and effort on this branch

https://github.com/flier/pyv8/tree/v5_api

which attempts to port PyV8 to the latest V8 API version.

@buffer buffer self-assigned this Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants