use crate::prelude::COSPAR;
use pyo3::{pymethods, PyResult};
#[pymethods]
impl COSPAR {
#[new]
fn py_new(year: u16, launch: u16, code: &str) -> Self {
Self {
year,
launch,
code: code.to_string(),
}
}
fn __str__(&self) -> String {
format!("{}", self)
}
fn __format__(&self, _specs: &str) -> PyResult<String> {
Ok(format!("{}", self))
}
}