Skip to content

Conversation

@jhonabreul
Copy link
Collaborator

@jhonabreul jhonabreul commented Apr 25, 2025

Description

Improve ExtendedDictionary to better behave as a Python dictionary (see QuantConnect/pythonnet#99).

Now Pythonnet will add container operator (in) to every class that defines Count and ContainsKey, so now ExtendedDictionary defines those.

Related Issue

Closes #8717

Motivation and Context

Requires Documentation Change

How Has This Been Tested?

Unit tests
Regression algorithms

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@jhonabreul jhonabreul force-pushed the bug-8717-python-dict-tidy-up branch from b3f011b to 0841ecc Compare April 28, 2025 21:15
Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jhonabreul jhonabreul changed the title Make ExtendedDictionary extend IDictionary ExtendedDictionary improvements Apr 28, 2025
@jhonabreul jhonabreul force-pushed the bug-8717-python-dict-tidy-up branch from 7156c39 to dd06144 Compare May 1, 2025 16:00
Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 🚀

@jhonabreul jhonabreul merged commit 053c9a2 into QuantConnect:master May 2, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python Extended Dictionary Tidy Up

2 participants