mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
Python - Remove misleading __repr__
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
extern crate tokenizers as tk;
|
extern crate tokenizers as tk;
|
||||||
|
|
||||||
use pyo3::prelude::*;
|
use pyo3::prelude::*;
|
||||||
use pyo3::PyObjectProtocol;
|
|
||||||
|
|
||||||
#[pyclass(dict)]
|
#[pyclass(dict)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
@ -15,16 +14,6 @@ impl Encoding {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pyproto]
|
|
||||||
impl PyObjectProtocol for Encoding {
|
|
||||||
fn __repr__(&self) -> PyResult<String> {
|
|
||||||
Ok(format!(
|
|
||||||
"Encoding {{ original: '{}', ... }}",
|
|
||||||
self.encoding.get_original()
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[pymethods]
|
#[pymethods]
|
||||||
impl Encoding {
|
impl Encoding {
|
||||||
// #[getter]
|
// #[getter]
|
||||||
|
Reference in New Issue
Block a user