-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve array interface for txn/gtxn/txna/gtxna
- Loading branch information
1 parent
c8c52fb
commit b46a663
Showing
7 changed files
with
303 additions
and
524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
from .expr import Expr | ||
|
||
class Array(ABC): | ||
"""Represents a variable length array of objects.""" | ||
|
||
@abstractmethod | ||
def length(self) -> Expr: | ||
"""Get the length of the array.""" | ||
pass | ||
|
||
@abstractmethod | ||
def __getitem__(self, index: int): | ||
"""Get the value at a given index in this array.""" | ||
pass |
Oops, something went wrong.