Code: Select all
init python:
from typing import Optional, Union
This isn't completely functional in 8.2:
https://renpy.org/doc/html/changelog.ht ... ren-py-8-0Python 3 Support (Ren'Py 8.0)
...
The ability to annotate functions arguments and return values with type information. (This is only supported in Python.)
Both in the last stable release and "+ Nightly Fix":
8.2.1.24030407
8.2.2.24032701+nightly
you get errors with some type hint annotations like
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/inventory.rpy", line 676, in script
init python:
File "game/inventory.rpy", line 676, in script
init python:
File "game/inventory.rpy", line 684, in <module>
def findLast(l: list, val) -> Optional[int]:
NameError: name 'Optional' is not defined
A program to test the bug:
download/file.php?id=64314
posted in
viewtopic.php?t=66699