Commit 2adef37
Fix Python docs: correct Py.Decorator to Py.Decorate and fix examples
- Rename Py.Decorator to Py.Decorate (the actual API name)
- Replace record example with class example (records already compile to
@DataClass automatically, and Py.Decorate cannot be used on records)
- Remove function decorator example (Fable doesn't support attributes on
functions, only on types)
- Add single-argument form example for local decorators
- Move Class Attributes section before Python Decorators since the
decorator example references Py.ClassAttributes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5d38a6d commit 2adef37
1 file changed
Lines changed: 28 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
492 | 484 | | |
493 | 485 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
| 486 | + | |
501 | 487 | | |
502 | | - | |
| 488 | + | |
503 | 489 | | |
504 | 490 | | |
505 | 491 | | |
506 | 492 | | |
507 | 493 | | |
508 | | - | |
| 494 | + | |
509 | 495 | | |
510 | 496 | | |
511 | 497 | | |
512 | 498 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
517 | 504 | | |
518 | 505 | | |
519 | 506 | | |
520 | 507 | | |
521 | 508 | | |
522 | | - | |
523 | | - | |
524 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
525 | 513 | | |
526 | 514 | | |
527 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
528 | 522 | | |
529 | 523 | | |
530 | 524 | | |
| |||
0 commit comments