Skip to content

Commit e17866e

Browse files
committed
Clarified implicit conversion in the readme
1 parent 488d649 commit e17866e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [General](#general)
1111
- [Types](#types)
1212
- [Operators](#operators)
13+
- [Implicit conversions](#implicit-conversions)
1314
- [Default functions](#default-functions)
1415
- [Differences with Python and JavaScript](#differences-with-python-and-javascript)
1516
- [Differences with Python](#differences-with-python)
@@ -113,6 +114,11 @@ In addition to the above, the following generic operators are also available:
113114
- `a not in b`: return true if `b` (a string, array, or object) does not contain `a`, false otherwise.
114115
115116
117+
### Implicit conversions
118+
119+
Implicit type conversions are not allowed: types must match exactly the constraints listed above, otherwise an error is raised.
120+
121+
116122
### Default functions
117123
118124
To keep the library lightweight, jsonexpr comes with only the most basic functions by default. This includes:
@@ -129,12 +135,14 @@ To keep the library lightweight, jsonexpr comes with only the most basic functio
129135
- `ceil(a)`: return nearest integer value to `a` (rounding up).
130136
- `len(a)`: return the size (length) or an array, object, or string.
131137
132-
This list can be extended with your own functions, see below.
138+
This list can be extended with custom functions, see below.
133139
134140
135141
### Differences with Python and JavaScript
136142
137143
- The comparison operators `==` and `!=` raise an error when attempting to compare values of incompatible types (other than `null`).
144+
- Any operation involving `null` (other than `==` and `!=`) will raise an error.
145+
- Using values other than booleans in `if`/`else`, `and`, or `or` will raise an error.
138146
- When the division operation `/` is used with two integers, this results in integer division.
139147
- Bitwise operators are not implemented.
140148

0 commit comments

Comments
 (0)