equal
deleted
inserted
replaced
115 } |
115 } |
116 |
116 |
117 def partialmatch(&self, node: PyObject) -> PyResult<Option<PyBytes>> { |
117 def partialmatch(&self, node: PyObject) -> PyResult<Option<PyBytes>> { |
118 let opt = self.get_nodetree(py)?.borrow(); |
118 let opt = self.get_nodetree(py)?.borrow(); |
119 let nt = opt.as_ref().unwrap(); |
119 let nt = opt.as_ref().unwrap(); |
120 let idx = &*self.cindex(py).borrow(); |
120 let idx = &*self.index(py).borrow(); |
121 |
121 |
122 let node_as_string = if cfg!(feature = "python3-sys") { |
122 let node_as_string = if cfg!(feature = "python3-sys") { |
123 node.cast_as::<PyString>(py)?.to_string(py)?.to_string() |
123 node.cast_as::<PyString>(py)?.to_string(py)?.to_string() |
124 } |
124 } |
125 else { |
125 else { |