| 1 |
# Builtins stubs used implicitly in program transformation test cases. |
| 2 |
|
| 3 |
class object: |
| 4 |
def __init__(self) -> None: pass |
| 5 |
|
| 6 |
class type: pass |
| 7 |
|
| 8 |
# str is handy for debugging; allows outputting messages. |
| 9 |
class str: pass |
| 10 |
|
| 11 |
# Primitive types int/float have special coercion behaviour (they may have |
| 12 |
# a different representation from ordinary values). |
| 13 |
|
| 14 |
class int: pass |
| 15 |
|
| 16 |
class float: pass |
| 17 |
|
| 18 |
|
| 19 |
# The functions below are special functions used in test cases; their |
| 20 |
# implementations are actually in the __dynchk module, but they are defined |
| 21 |
# here so that the semantic analyzer and the type checker are happy without |
| 22 |
# having to analyze the entire __dynchk module all the time. |
| 23 |
# |
| 24 |
# The transformation implementation has special case handling for these |
| 25 |
# functions; it's a bit ugly but it works for now. |
| 26 |
|
| 27 |
def __print(a1=None, a2=None, a3=None, a4=None): |
| 28 |
# Do not use *args since this would require list and break many test |
| 29 |
# cases. |
| 30 |
pass |
| 31 |
|
| 32 |
class dict: pass |