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

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