Skip to content

Commit 3b72d93

Browse files
Curts0Curtis Stallings
andauthored
PyObjects Sequencing (#95)
* sequencable pyobjects POC * pyobjects sequencing --------- Co-authored-by: Curtis Stallings <curtis.stallings@rockwellautomation.com>
1 parent 8145320 commit 3b72d93

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "python_tabular"
7-
version = "0.5.1"
7+
version = "0.5.2"
88
authors = [
99
{ name="Curtis Stallings", email="curtisrstallings@gmail.com" },
1010
]

pytabular/object.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def __getitem__(self, object):
9696
return [pyobject for pyobject in self._objects if object == pyobject.Name][
9797
-1
9898
]
99+
elif isinstance(object, slice):
100+
cls = type(self)
101+
return cls(self._objects[object])
99102
else:
100103
return self._objects[object]
101104

0 commit comments

Comments
 (0)