Get the instance of the column with the given `colpathname`. If the column does not exist in the table, a `KeyError` is raised.
(self, colpathname: str)
| 1194 | self._v_dtype = self.description._v_dtype |
| 1195 | |
| 1196 | def _get_column_instance(self, colpathname: str): |
| 1197 | """Get the instance of the column with the given `colpathname`. |
| 1198 | |
| 1199 | If the column does not exist in the table, a `KeyError` is |
| 1200 | raised. |
| 1201 | |
| 1202 | """ |
| 1203 | try: |
| 1204 | return functools.reduce( |
| 1205 | getattr, colpathname.split("/"), self.description |
| 1206 | ) |
| 1207 | except AttributeError: |
| 1208 | raise KeyError( |
| 1209 | "table ``%s`` does not have a column named ``%s``" |
| 1210 | % (self._v_pathname, colpathname) |
| 1211 | ) |
| 1212 | |
| 1213 | _check_column = _get_column_instance |
| 1214 |
no outgoing calls
no test coverage detected