Created
July 31, 2019 15:32
-
-
Save metasim/6c487e5cc9f85d3821ef738fa445aa0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def set_dims(parts): | |
| assert(len(parts) is 2, "Expected dimensions specification to have exactly two components") | |
| assert(all([isinstance(p, int) and p > 0 for p in parts]), | |
| "Expected all components in dimensions to be positive integers") | |
| options.update({ | |
| "imageWidth": parts[0], | |
| "imageHeight": parts[1] | |
| }) | |
| if raster_dimensions is not None: | |
| if isinstance(raster_dimensions, tuple): | |
| set_dims(raster_dimensions) | |
| elif isinstance(raster_dimensions, str): | |
| p = list(map(lambda s: int(s), raster_dimensions.split(','))) | |
| set_dims(p) |
Author
IDK but maybe this seems correct
iswill return True if two variables point to the same object,==if the objects referred to by the variables are equal.
And as I recall there is some interesting things like if i say a=2 and b=2 then a is b is true because both objects will point ot the same underlying object. I think.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I honestly don't know the difference.