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

Disallow + operator for dicts in Skylark #1086

davidzchen opened this Issue Mar 25, 2016 · 2 comments


None yet
5 participants

davidzchen commented Mar 25, 2016

Currently, we define the + operator for concatenating dictionaries in Skylark. However, this is not valid in Python. This will be a problem when the Skylark docgen tool is available (see #712) since the tool will evaluate the Skylark code as Python.

Since Skylark is meant to be a subset of Python anyway, we should disallow + for dictionaries in Skylark and recommend an alternative.


This comment has been minimized.


davidzchen commented Jun 20, 2016

@dslomov dslomov added this to the 0.6 milestone Dec 8, 2016


This comment has been minimized.


MarkusTeufelberger commented Jun 1, 2017

How does skylark handle this case anyways?

a = {"foo":"bar"}
b = {"foo":"baz"}
a + b = ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment