Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Caching is not unique for classes with call function

Open
#868 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reproducing the issue's Test class with call and the caching feature, then trace how callable classes and their instances are represented for cache keys. Check whether repeated use of the same dynamically defined callable reuses the cached calculation, and document or test the observed behavior before changing it.

Written by the indexing model from the issue text.

Description

bug

For example

class Test:
    def __call__(self, a, b):
        return a+b

While the class definition is unique the instance Test() is not this results in a different hash and consequently the calculation is repeated rather than reloaded. So at the moment it is not recommended to use dynamically defined objects in combination with the caching feature.

Dominant language
Python
Stars
77
Forks
7
Avg merge
10h 32m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyiron/executorlib

All issues in pyiron/executorlib

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.