mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +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):
|
||||
SyntaxError: expected ':'
|
||||
|
||||
>>> def f[T]()
|
||||
... pass
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: expected ':'
|
||||
|
||||
>>> class A
|
||||
... pass
|
||||
Traceback (most recent call last):
|
||||
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:
|
||||
... pass
|
||||
Traceback (most recent call last):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue