mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
gh-110938: More syntax tests for PEP695 funcs and classes (#110986)
This commit is contained in:
parent
411d6a638e
commit
220bcc9e27
1 changed files with 15 additions and 0 deletions
|
@ -1004,11 +1004,26 @@ Missing ':' before suites:
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
SyntaxError: expected ':'
|
SyntaxError: expected ':'
|
||||||
|
|
||||||
|
>>> def f[T]()
|
||||||
|
... pass
|
||||||
|
Traceback (most recent call last):
|
||||||
|
SyntaxError: expected ':'
|
||||||
|
|
||||||
>>> class A
|
>>> class A
|
||||||
... pass
|
... pass
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
SyntaxError: expected ':'
|
SyntaxError: expected ':'
|
||||||
|
|
||||||
|
>>> class A[T]
|
||||||
|
... pass
|
||||||
|
Traceback (most recent call last):
|
||||||
|
SyntaxError: expected ':'
|
||||||
|
|
||||||
|
>>> class A[T]()
|
||||||
|
... pass
|
||||||
|
Traceback (most recent call last):
|
||||||
|
SyntaxError: expected ':'
|
||||||
|
|
||||||
>>> class R&D:
|
>>> class R&D:
|
||||||
... pass
|
... pass
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue