fn value(&self) -> PyResult<PyObject> {
        use Node::*;

        let gil = Python::acquire_gil();
        let py = gil.python();

        match &self.node {
            Literal(l) => literal_value(l),
            PreludeType(p) => Ok(format!("{:?}", p).to_object(py)),
            Rule(r) => Ok(r.name.to_object(py)),
            Unwrap(r) => Ok(r.name.to_object(py)),
            Occur(o) => Ok(o.symbol().to_object(py)),
            //Range(_) => ???
            _ => Err(PyErr::new::<AttributeError, _>(())),
        }
    }
// For variants that have a single value, return it.
For variants that have a single value, return it.
For variants that have a single value return it .
fn value(&self) -> PyResult<PyObject> {
        use Node::*;
        let gil = Python::acquire_gil();
        let py = gil.python();
        match &self.node {
            Literal(l) => literal_value(l),
            PreludeType(p) => Ok(format!("{:?}", p).to_object(py)),
            Rule(r) => Ok(r.name.to_object(py)),
            Unwrap(r) => Ok(r.name.to_object(py)),
            Occur(o) => Ok(o.symbol().to_object(py)),
            //Range(_) => ???
            _ => Err(PyErr::new::<AttributeError, _>(())),
        }
    }
fn value ( & self ) -> PyResult < PyObject > { use Node :: * ; let gil = Python :: acquire_gil ( ) ; let py = gil . python ( ) ; match & self . node { Literal ( l ) => literal_value ( l ) , PreludeType ( p ) => Ok ( format ! ( " " p ) . to_object ( py ) ) , Rule ( r ) => Ok ( r . name . to_object ( py ) ) , Unwrap ( r ) => Ok ( r . name . to_object ( py ) ) , Occur ( o ) => Ok ( o . symbol ( ) . to_object ( py ) ) , //Range(_) => ??? _ => Err ( PyErr :: new :: < AttributeError , _ > ( ( ) ) ) , } }
For variants that have a single value, return it.
For variants that have a single value return it .
&self
&self