Skip to content

Commit fcd4cef

Browse files
authored
Update README.md
1 parent eb0628c commit fcd4cef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
When other approaches are impractical, the `disinheritance` module may be a viable alternative. The `disinherit` decorator object automatically overrides unwanted inherited methods and attributes and prevents their use in subclass instances, except where specified as exemptions. Features of `disinherit` include:
55

6-
* Exemptions can be one or more type methods/attributes or even entire types in the subclass MRO (though exemptions are managed internally by type/containing type and declaration order)
6+
* Exemptions can be one or more type methods or even entire types in the subclass MRO (though exemptions are managed internally by type/containing type and declaration order)
77
* Exemptions can be from anywhere in the MRO and will be applied to the subclass as overrides (unless already overriden in the subclass)
88
* `dir()` call on a subclass instance will not include disinherited methods/attributes
99
* Attempts at attribute retrieval of disinherited methods/attributes from an instance produce attribute errors
1010
* `help()` call on a subclass type will show disinherited methods/attributes as not implemented (i.e., as the `NotImplemented` singleton)
1111
* Invalid exemptions (i.e., types and type methods/attributes not in the MRO) are silently ignored
1212
* Subclass `__dir__` and `__getattribute__` methods are wrapped to both maintain original functionality and account for disinherited methods/attributes
1313
* Exemptions are explicitly specified using an `exempt` keyword argument for the sake of clarity and deliberate use in style
14+
* _Note: type attributes cannot be directly referenced for exemptions where an attribute does not back-reference the containing type_
1415

1516
## Example:
1617
```

0 commit comments

Comments
 (0)