mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[3.12] gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986) (#111023)
gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986)
(cherry picked from commit 220bcc9e27
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
2bca5f43af
commit
004618fed7
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