You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user-friendly python programming environment for beginners.
@@ -40,6 +37,11 @@ Run `wypp --help` for usage information.
40
37
41
38
Here is the [Changelog](ChangeLog.md).
42
39
40
+
***Breaking change** in version 2.0.0 (2025-0-24): type annotations are now only
41
+
checked when entering/exiting a function. Before, certain things such as lists
42
+
or callable were put behind wrapper objects. For example, these wrappers ensured
43
+
that only ints could be appended to a list of type `list[int]`. However, these
44
+
wrappers came with several drawbacks, so they were removed in release 2.0.0
43
45
***Breaking change** in version 0.12.0 (2021-09-28): type annotations are now checked
44
46
dynamically when the code is executed.
45
47
This behavior can be deactivated in the settings of the extension.
@@ -50,7 +52,10 @@ You need an explicit import statement such as `from wypp import *`.
50
52
51
53
Here is a screen shot:
52
54
53
-

55
+

56
+
57
+
There is also a visualization mode, similar to [Python Tutor](https://pythontutor.com/):
58
+

54
59
55
60
When hitting the RUN button, the vscode extension saves the current file, opens
56
61
a terminal and executes the file with Python, staying in interactive mode after
@@ -59,7 +64,7 @@ all definitions have been executed.
59
64
The file being executed should contain the following import statement in the first line:
60
65
61
66
~~~python
62
-
from wypp import*
67
+
from wypp import*
63
68
~~~
64
69
65
70
Running the file with the RUN button makes the following features available:
@@ -193,39 +198,6 @@ before the type being defined, for example to define recursive types or as
193
198
the type of `self` inside of classes. In fact, there is no check at all to make sure
194
199
that anotations refer to existing types.
195
200
196
-
For builtin `list[T]` the following operations are typechecked:
197
-
-`list[idx]`
198
-
-`list[idx] = value`
199
-
-`list += [...]`
200
-
-`list.append(value)`
201
-
-`list.insert(idx, value)`
202
-
-`list.extend(iterator)`
203
-
-`for i in list:` (Iterator)
204
-
205
-
For builtin `set[T]` these operations are typechecked:
206
-
-`set.add(value)`
207
-
-`set.pop()`
208
-
-`set.remove(value)` Value must be of `T`
209
-
-`set.update(other, ...)`
210
-
-`value in set` Value must be of `T`
211
-
-`for i in set:` (Iterator)
212
-
213
-
For builtin `dict[K,V]` the supported typechecked operations are:
214
-
-`dict.get(key)`
215
-
-`dict.items()`
216
-
-`dict.keys()`
217
-
-`dict.pop()`
218
-
-`dict.popitem()`
219
-
-`dict.setdefault(key, default)` <br/>_Note:_ In contrast to the standard library `default` is required, to avoid inserting `None` as value into otherwise typed dicts.
0 commit comments