Added a "get" function with a dictionary get-by-key semantics.

Differs from dictionary attribution ("dict.key") because allows dynamic key generation ("dict.get(part1+part2)").
This commit is contained in:
Alexander Tivelkov
2014-04-23 15:10:29 +04:00
parent 5718bfa0d5
commit 675b0c1151
3 changed files with 3 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
from setuptools import setup, find_packages
setup(name='yaql',
version='0.2.2',
version='0.2.3',
description="Yet Another Query Language",
author='Mirantis, Inc.',
author_email='info@mirantis.com',

View File

@@ -16,7 +16,7 @@ import parser
import context
from yaql.functions import builtin, extended
__versioninfo__ = (0, 2, 2)
__versioninfo__ = (0, 2, 3)
__version__ = '.'.join(map(str, __versioninfo__))

View File

@@ -204,6 +204,7 @@ def add_to_context(context):
# collection filtering
context.register_function(get_by_index, "where")
context.register_function(filter_by_predicate, "where")
context.register_function(dict_attribution, "get")
# comparison operations
context.register_function(greater_then, '#operator_>')