(&self)
| 473 | |
| 474 | #[pygetset] |
| 475 | pub fn f_lineno(&self) -> usize { |
| 476 | // If lasti is 0, execution hasn't started yet - use first line number |
| 477 | // Similar to PyCode_Addr2Line which returns co_firstlineno for addr_q < 0 |
| 478 | if self.lasti() == 0 { |
| 479 | self.code.first_line_number.map(|n| n.get()).unwrap_or(1) |
| 480 | } else { |
| 481 | self.current_location().line.get() |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | #[pygetset(setter)] |
| 486 | fn set_f_lineno(&self, value: PySetterValue, vm: &VirtualMachine) -> PyResult<()> { |
no test coverage detected