Skip to content

Add intersection operator (&) for creating Markets#128

Merged
alexanderthclark merged 2 commits into
mainfrom
feature/intersection-operator
May 27, 2025
Merged

Add intersection operator (&) for creating Markets#128
alexanderthclark merged 2 commits into
mainfrom
feature/intersection-operator

Conversation

@alexanderthclark

Copy link
Copy Markdown
Owner
  • Implement and method on Demand and Supply classes
  • Allows intuitive market creation: market = demand & supply
  • Works in both directions: demand & supply == supply & demand
  • Comprehensive unit tests ensure correct behavior

This makes market creation more intuitive and Pythonic:
market = demand & supply
instead of:
market = Market(demand, supply)

🤖 Generated with Claude Code

alexanderthclark and others added 2 commits May 26, 2025 23:40
- Implement __and__ method on Demand and Supply classes
- Allows intuitive market creation: market = demand & supply
- Works in both directions: demand & supply == supply & demand
- Comprehensive unit tests ensure correct behavior

This makes market creation more intuitive and Pythonic:
  market = demand & supply
instead of:
  market = Market(demand, supply)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Increment version from 0.1.0 to 0.1.1
- Update quick example in index.rst to demonstrate the new & operator
- Remove explicit Market import since it's no longer needed in the example

The intersection operator makes the code more intuitive and Pythonic.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@alexanderthclark alexanderthclark merged commit 39fe2f0 into main May 27, 2025
3 of 6 checks passed
@alexanderthclark alexanderthclark deleted the feature/intersection-operator branch May 27, 2025 03:48
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.

1 participant