ATLAS Offline Software
Classes | Functions
Py Namespace Reference

Classes

struct  cnv
 helper method to convert a type to a Py::Object More...
 
struct  cnv< bool >
 
struct  cnv< double >
 
struct  cnv< float >
 
struct  cnv< int >
 
struct  cnv< long >
 
struct  cnv< long int >
 
struct  cnv< long unsigned int >
 
struct  cnv< short int >
 
struct  cnv< std::list< T > >
 
struct  cnv< std::pair< T, U > >
 
struct  cnv< std::string >
 
struct  cnv< std::vector< T > >
 
struct  cnv< unsigned int >
 
struct  cnv< unsigned long >
 
struct  cpp_typeinfo
 
struct  cpp_typeinfo< bool >
 
struct  cpp_typeinfo< double >
 
struct  cpp_typeinfo< float >
 
struct  cpp_typeinfo< int >
 
struct  cpp_typeinfo< long int >
 
struct  cpp_typeinfo< short int >
 
struct  cpp_typeinfo< std::list< T > >
 
struct  cpp_typeinfo< std::pair< T, U > >
 
struct  cpp_typeinfo< std::string >
 
struct  cpp_typeinfo< std::vector< T > >
 
struct  cpp_typeinfo< unsigned int >
 
struct  cpp_typeinfo< unsigned long >
 
class  DataStore
 
class  Store
 

Functions

std::string repr (PyObject *o)
 

Function Documentation

◆ repr()

std::string Py::repr ( PyObject o)

Definition at line 25 of file PyStore.cxx.

26 {
27  // PyObject_Repr returns a new ref.
28  PyObject* py_repr = PyObject_Repr( o );
29  if ( !py_repr || !PyUnicode_Check(py_repr) ) {
30  Py_XDECREF( py_repr );
31  return "";
32  }
33 
34  std::string cpp_repr = PyUnicode_AsUTF8(py_repr);
35  Py_DECREF( py_repr );
36  return cpp_repr;
37 }
PyObject
_object PyObject
Definition: IPyComponent.h:26