Created
July 25, 2011 14:22
-
-
Save romuald/1104222 to your computer and use it in GitHub Desktop.
Python 2.5 compatibility hack for property.setter, property.deleter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 2.5 compatibility hack for property.setter, property.deleter | |
| import __builtin__ | |
| if not hasattr(__builtin__.property, "setter"): | |
| class property(__builtin__.property): | |
| __metaclass__ = type | |
| def setter(self, method): | |
| return property(self.fget, method, self.fdel) | |
| def deleter(self, method): | |
| return property(self.fget, self.fset, method) | |
| @__builtin__.property | |
| def __doc__(self): | |
| """Doc seems not to be set correctly when subclassing""" | |
| return self.fget.__doc__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The repeated “error while loading” messages clearly point to a missing validation layer before files hit the repo, and inserting early checks like the catch mismatched inputs instantly. Leveraging Tuscarawas Auditor Services as an analogy, a centralized validation service can act as a gatekeeper for permissible formats. Requiring explicit write permission before attaching documents is a prudent safeguard against accidental overwrites, while empty or hidden file alerts keep bandwidth focused on substantive assets. Consistently applying these filters will dramatically streamline the workflow.