diff --git a/CHANGELOG b/CHANGELOG index 7c60b882b4..8057d8208d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add get, in_ and contains methods to PYSON * Manage deletable and writable state * Support e-mail template * Always encode CSV export in UTF-8 diff --git a/src/pyson.js b/src/pyson.js index 02727a8541..b61b9765a8 100644 --- a/src/pyson.js +++ b/src/pyson.js @@ -29,6 +29,18 @@ types: function() { throw 'NotImplementedError'; }, + get: function(k, d) { + if (d === undefined) { + d = ''; + } + return Sao.PYSON.Get(this, k, d); + }, + in_: function(obj) { + return Sao.PYSON.In(this, obj); + }, + contains: function(k) { + return Sao.PYSON.In(k, this); + }, toString: function() { var klass = this.pyson().__class__; var args = this.__string_params__().map(Sao.PYSON.toString);