Skip to content

Commit 99f1d72

Browse files
committed
use def_readonly for member values
1 parent ec5829c commit 99f1d72

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/G3Frame.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ PYBINDINGS("core", scope) {
493493
register_class<G3FrameObject>(scope, "G3FrameObject",
494494
"Base class for objects that can be added to a frame. All such "
495495
"must inherit from G3FrameObject in C++. Pickle hooks are overridden "
496-
"to use the fast internal serialization.")
496+
"to use the fast internal serialization")
497497
.def("Description", &G3FrameObject::Description,
498498
"Long-form human-readable description of the object")
499499
.def("Summary", &G3FrameObject::Summary,
@@ -542,7 +542,7 @@ PYBINDINGS("core", scope) {
542542
"Use sparingly and with care.")
543543
.def_readwrite("type", &G3Frame::type,
544544
"Type code for frame. See general G3Frame docstring.")
545-
.def_property_readonly("_filename", [](const G3Frame &f) { return f._filename; },
545+
.def_readonly("_filename", &G3Frame::_filename,
546546
"Source filename for frame, if read in using G3Reader. This attribute is "
547547
"fragile, use at your own risk.")
548548
.def("__setitem__", &G3Frame::Put)

core/src/G3Pipeline.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ PYBINDINGS("core", scope) {
473473
"Halts all running pipelines after they flush all currently "
474474
"in-flight frames. Once set, the first module will not be "
475475
"called again.")
476-
.def_property_readonly("last_frame",
477-
[](const G3Pipeline &p) { return p.last_frame; })
476+
.def_readonly("last_frame",
477+
&G3Pipeline::last_frame)
478478
;
479479
}

0 commit comments

Comments
 (0)