vmware / vmware/pyvmomi

__eq__ method in VmomiSupport does not work if you compare it Str

Open
#340 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Hi,

I use objects as key in a dictionary to see if I already used that object and good all the required informations ( eg specific attributes ). The current implementation does not work as str has no _moId method.
This is fixed in pull request #339.
Could you please merge this.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the eq implementation in VmomiSupport and review pull request #339, which the issue identifies as the proposed fix. Verify comparisons between VmomiSupport objects and str values, including the dictionary-key use case, and confirm the existing tests or expected behavior cover that comparison.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.