|
419 | 419 | >>> def foo(/,a,b=,c):
|
420 | 420 | ... pass
|
421 | 421 | Traceback (most recent call last):
|
422 |
| -SyntaxError: at least one argument must precede / |
| 422 | +SyntaxError: at least one parameter must precede / |
423 | 423 |
|
424 | 424 | >>> def foo(a,/,/,b,c):
|
425 | 425 | ... pass
|
|
454 | 454 | >>> def foo(a,*b=3,c):
|
455 | 455 | ... pass
|
456 | 456 | Traceback (most recent call last):
|
457 |
| -SyntaxError: var-positional argument cannot have default value |
| 457 | +SyntaxError: var-positional parameter cannot have default value |
458 | 458 |
|
459 | 459 | >>> def foo(a,*b: int=,c):
|
460 | 460 | ... pass
|
461 | 461 | Traceback (most recent call last):
|
462 |
| -SyntaxError: var-positional argument cannot have default value |
| 462 | +SyntaxError: var-positional parameter cannot have default value |
463 | 463 |
|
464 | 464 | >>> def foo(a,**b=3):
|
465 | 465 | ... pass
|
466 | 466 | Traceback (most recent call last):
|
467 |
| -SyntaxError: var-keyword argument cannot have default value |
| 467 | +SyntaxError: var-keyword parameter cannot have default value |
468 | 468 |
|
469 | 469 | >>> def foo(a,**b: int=3):
|
470 | 470 | ... pass
|
471 | 471 | Traceback (most recent call last):
|
472 |
| -SyntaxError: var-keyword argument cannot have default value |
| 472 | +SyntaxError: var-keyword parameter cannot have default value |
473 | 473 |
|
474 | 474 | >>> def foo(a,*a, b, **c, d):
|
475 | 475 | ... pass
|
476 | 476 | Traceback (most recent call last):
|
477 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 477 | +SyntaxError: parameters cannot follow var-keyword parameter |
478 | 478 |
|
479 | 479 | >>> def foo(a,*a, b, **c, d=4):
|
480 | 480 | ... pass
|
481 | 481 | Traceback (most recent call last):
|
482 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 482 | +SyntaxError: parameters cannot follow var-keyword parameter |
483 | 483 |
|
484 | 484 | >>> def foo(a,*a, b, **c, *d):
|
485 | 485 | ... pass
|
486 | 486 | Traceback (most recent call last):
|
487 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 487 | +SyntaxError: parameters cannot follow var-keyword parameter |
488 | 488 |
|
489 | 489 | >>> def foo(a,*a, b, **c, **d):
|
490 | 490 | ... pass
|
491 | 491 | Traceback (most recent call last):
|
492 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 492 | +SyntaxError: parameters cannot follow var-keyword parameter |
493 | 493 |
|
494 | 494 | >>> def foo(a=1,/,**b,/,c):
|
495 | 495 | ... pass
|
496 | 496 | Traceback (most recent call last):
|
497 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 497 | +SyntaxError: parameters cannot follow var-keyword parameter |
498 | 498 |
|
499 | 499 | >>> def foo(*b,*d):
|
500 | 500 | ... pass
|
501 | 501 | Traceback (most recent call last):
|
502 |
| -SyntaxError: * argument may appear only once |
| 502 | +SyntaxError: * may appear only once |
503 | 503 |
|
504 | 504 | >>> def foo(a,*b,c,*d,*e,c):
|
505 | 505 | ... pass
|
506 | 506 | Traceback (most recent call last):
|
507 |
| -SyntaxError: * argument may appear only once |
| 507 | +SyntaxError: * may appear only once |
508 | 508 |
|
509 | 509 | >>> def foo(a,b,/,c,*b,c,*d,*e,c):
|
510 | 510 | ... pass
|
511 | 511 | Traceback (most recent call last):
|
512 |
| -SyntaxError: * argument may appear only once |
| 512 | +SyntaxError: * may appear only once |
513 | 513 |
|
514 | 514 | >>> def foo(a,b,/,c,*b,c,*d,**e):
|
515 | 515 | ... pass
|
516 | 516 | Traceback (most recent call last):
|
517 |
| -SyntaxError: * argument may appear only once |
| 517 | +SyntaxError: * may appear only once |
518 | 518 |
|
519 | 519 | >>> def foo(a=1,/*,b,c):
|
520 | 520 | ... pass
|
|
538 | 538 |
|
539 | 539 | >>> lambda /,a,b,c: None
|
540 | 540 | Traceback (most recent call last):
|
541 |
| -SyntaxError: at least one argument must precede / |
| 541 | +SyntaxError: at least one parameter must precede / |
542 | 542 |
|
543 | 543 | >>> lambda a,/,/,b,c: None
|
544 | 544 | Traceback (most recent call last):
|
|
570 | 570 |
|
571 | 571 | >>> lambda a,*b=3,c: None
|
572 | 572 | Traceback (most recent call last):
|
573 |
| -SyntaxError: var-positional argument cannot have default value |
| 573 | +SyntaxError: var-positional parameter cannot have default value |
574 | 574 |
|
575 | 575 | >>> lambda a,**b=3: None
|
576 | 576 | Traceback (most recent call last):
|
577 |
| -SyntaxError: var-keyword argument cannot have default value |
| 577 | +SyntaxError: var-keyword parameter cannot have default value |
578 | 578 |
|
579 | 579 | >>> lambda a, *a, b, **c, d: None
|
580 | 580 | Traceback (most recent call last):
|
581 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 581 | +SyntaxError: parameters cannot follow var-keyword parameter |
582 | 582 |
|
583 | 583 | >>> lambda a,*a, b, **c, d=4: None
|
584 | 584 | Traceback (most recent call last):
|
585 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 585 | +SyntaxError: parameters cannot follow var-keyword parameter |
586 | 586 |
|
587 | 587 | >>> lambda a,*a, b, **c, *d: None
|
588 | 588 | Traceback (most recent call last):
|
589 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 589 | +SyntaxError: parameters cannot follow var-keyword parameter |
590 | 590 |
|
591 | 591 | >>> lambda a,*a, b, **c, **d: None
|
592 | 592 | Traceback (most recent call last):
|
593 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 593 | +SyntaxError: parameters cannot follow var-keyword parameter |
594 | 594 |
|
595 | 595 | >>> lambda a=1,/,**b,/,c: None
|
596 | 596 | Traceback (most recent call last):
|
597 |
| -SyntaxError: arguments cannot follow var-keyword argument |
| 597 | +SyntaxError: parameters cannot follow var-keyword parameter |
598 | 598 |
|
599 | 599 | >>> lambda *b,*d: None
|
600 | 600 | Traceback (most recent call last):
|
601 |
| -SyntaxError: * argument may appear only once |
| 601 | +SyntaxError: * may appear only once |
602 | 602 |
|
603 | 603 | >>> lambda a,*b,c,*d,*e,c: None
|
604 | 604 | Traceback (most recent call last):
|
605 |
| -SyntaxError: * argument may appear only once |
| 605 | +SyntaxError: * may appear only once |
606 | 606 |
|
607 | 607 | >>> lambda a,b,/,c,*b,c,*d,*e,c: None
|
608 | 608 | Traceback (most recent call last):
|
609 |
| -SyntaxError: * argument may appear only once |
| 609 | +SyntaxError: * may appear only once |
610 | 610 |
|
611 | 611 | >>> lambda a,b,/,c,*b,c,*d,**e: None
|
612 | 612 | Traceback (most recent call last):
|
613 |
| -SyntaxError: * argument may appear only once |
| 613 | +SyntaxError: * may appear only once |
614 | 614 |
|
615 | 615 | >>> lambda a=1,d=,c: None
|
616 | 616 | Traceback (most recent call last):
|
|
1304 | 1304 | Traceback (most recent call last):
|
1305 | 1305 | SyntaxError: expected '('
|
1306 | 1306 |
|
1307 |
| -Parenthesized arguments in function definitions |
| 1307 | +Parenthesized parameters in function definitions |
1308 | 1308 |
|
1309 | 1309 | >>> def f(x, (y, z), w):
|
1310 | 1310 | ... pass
|
|
2178 | 2178 |
|
2179 | 2179 | >>> with (lambda *:0): pass
|
2180 | 2180 | Traceback (most recent call last):
|
2181 |
| - SyntaxError: named arguments must follow bare * |
| 2181 | + SyntaxError: named parameters must follow bare * |
2182 | 2182 |
|
2183 | 2183 | Corner-cases that used to crash:
|
2184 | 2184 |
|
|
0 commit comments