Skip to content

feat: add tuple key support in GenericGraph.__getitem__()#4761

Open
mayank-dev-15 wants to merge 1 commit into
ManimCommunity:mainfrom
mayank-dev-15:fix/generic-graph-tuple-key
Open

feat: add tuple key support in GenericGraph.__getitem__()#4761
mayank-dev-15 wants to merge 1 commit into
ManimCommunity:mainfrom
mayank-dev-15:fix/generic-graph-tuple-key

Conversation

@mayank-dev-15
Copy link
Copy Markdown

Description\n\nAllows accessing edges via tuple keys like g[(1, 2)] in addition to vertex lookups like g[1]. Previously only vertex lookups were supported.\n\nFixes #3798\n\n## Changes\n- Extended GenericGraph.getitem() to accept tuple keys\n- Added tuple branch that delegates to self.edges[v]\n- Added docstring

Allows accessing edges via tuple keys like g[(1, 2)] in addition to
vertex lookups like g[1]. Previously only vertex lookups were supported.

Fixes ManimCommunity#3798
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