Skip to main content

By Andy Stokely

Python decorator library that adds customizeable dunder methods to decorated classes. This both decreases the amount of code that is normally required to implement dunder methods, and also helps reduce repitition when coding classes that use custom dunder methods with the same or similar code. Right now, the following dunder methods have corresponding dunder decorators:

__iter__ (dunder_iter) __setitem__ (dunder_setitem) __getitem__ (dunder_getitem) __missing__ (dunder_missing) __repr__ (dunder_repr)

If a dunder decorator is used without any parameters, it defines the special method with respect to the class object’s dictionary. However, the user is able to have the special method defined with repsect to one of the class object’s attributes by setting the attr parameter equal to the name of the attribute. Dunder decorators can also be used with classes that use __slots__, rather then a dictionary to store object attributes, by setting the slots parameter to True. For specific examples, see the examples in the dunder_decorator.py doc-strings.

Release files for dunderdecorators 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dunderdecorators 1.0.0
File Size Uploaded
dunderdecorators-1.0.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dunderdecorators 1.0.0
File Interpreter ABI Platform
dunderdecorators-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / dunderdecorators-1.0.0.tar.gz

Download URL dunderdecorators-1.0.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
85318164ef6e8d513bf8bdaa686fcc5d68d90a10ce69024e1436864c27f7e5a5
BLAKE2b-256 checksum
How to use checksums
af7b2cec27f060cf245f6b3eb8d5f825cb57e9f8d02914d3453aa7c9453c4575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.5

Release files / dunderdecorators-1.0.0-py3-none-any.whl

Download URL dunderdecorators-1.0.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
259957567c19c2a8ea25e441722f94773ab7813b90b47baf7bcad6310636aa27
BLAKE2b-256 checksum
How to use checksums
4791f5fe236ed8162d883adc557e41bf88b861c4925f554fd07dece25381b2a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page