Skip to content

remove __add__ operator #32

@dev-dull

Description

@dev-dull

__add__ was written to try to make _DDB more user friendly. When it was written, the DDB abstraction around _DDB didn't yet exist (to put it another way, what is now _DDB was once called DDB), so at the time, it made (some) sense to try and make things friendly with the + operator. Since _DDB is no longer meant to be used directly, we can change this kludgy code to a traditional function call instead.

Code refs:

  • PyXIE/ddb.py

    Line 173 in 39a0c12

    self[id] + user_data
  • PyXIE/ddb.py

    Lines 230 to 237 in 39a0c12

    def __add__(self, user_data):
    now = time()
    while now in self:
    sleep(0.1)
    now = time()
    self[now] = user_data
    self._cleanup()
    return self

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions