pub fn new(_py: Python, s: &[u8]) -> Py<PyBytes> {
        let ptr = s.as_ptr() as *const c_char;
        let len = s.len() as ffi::Py_ssize_t;
        unsafe {
            Py::from_owned_ptr_or_panic(ffi::PyBytes_FromStringAndSize(ptr, len))
        }
    }
/// Creates a new Python byte string object.
/// The byte string is initialized by copying the data from the `&[u8]`.
///
/// Panics if out of memory.
Creates a new Python byte string object.
The byte string is initialized by copying the data from the `&[u8]`.

Panics if out of memory.
Creates a new Python byte string object . The byte string is initialized by copying the data from the ` & [ u8 ] ` . Panics if out of memory .
pub fn new(_py: Python, s: &[u8]) -> Py<PyBytes> {
        let ptr = s.as_ptr() as *const c_char;
        let len = s.len() as ffi::Py_ssize_t;
        unsafe {
            Py::from_owned_ptr_or_panic(ffi::PyBytes_FromStringAndSize(ptr, len))
        }
    }
pub fn new ( _py : Python , s : & [ u8 ] ) -> Py < PyBytes > { let ptr = s . as_ptr ( ) as * const c_char ; let len = s . len ( ) as ffi :: Py_ssize_t ; unsafe { Py :: from_owned_ptr_or_panic ( ffi :: PyBytes_FromStringAndSize ( ptr , len ) ) } }
Creates a new Python byte string object.
Creates a new Python byte string object .
_py
Python
s
&[u8]
_py
Python
s
&[u8]