Commit 3519255
committed
Match CPython wording for __slots__ conflict and __doc__ delete errors
The behavior already matched CPython (the slot conflict is detected,
the __doc__ delete is rejected); only the message text drifted.
- "__slots__ conflicts with a class variable" -> drop the stray "a"
to match CPython's "conflicts with class variable".
- "cannot delete '__doc__' attribute of type 'X'" -> insert "immutable"
before "type" to match CPython's wording (CPython surfaces the same
phrase even for user-defined classes since the descriptor refuses
the delete unconditionally).1 parent 625e5bf commit 3519255
2 files changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4952 | 4952 | | |
4953 | 4953 | | |
4954 | 4954 | | |
4955 | | - | |
4956 | 4955 | | |
4957 | 4956 | | |
4958 | 4957 | | |
| |||
4961 | 4960 | | |
4962 | 4961 | | |
4963 | 4962 | | |
4964 | | - | |
4965 | 4963 | | |
4966 | 4964 | | |
4967 | 4965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2004 | 2004 | | |
2005 | 2005 | | |
2006 | 2006 | | |
2007 | | - | |
| 2007 | + | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | 2010 | | |
| |||
2404 | 2404 | | |
2405 | 2405 | | |
2406 | 2406 | | |
2407 | | - | |
| 2407 | + | |
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
| |||
0 commit comments