pyv8
pyv8 copied to clipboard
Added simple encapsulation
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.
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.