mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #3454 from YYun-D/doc_modify
Fix `bytearray` and `bytes` docs
This commit is contained in:
2
Lib/test/test_bytes.py
vendored
2
Lib/test/test_bytes.py
vendored
@@ -1753,8 +1753,6 @@ class AssortedBytesTest(unittest.TestCase):
|
||||
self.assertEqual(bytes(b"abc") < b"ab", False)
|
||||
self.assertEqual(bytes(b"abc") <= b"ab", False)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
@test.support.requires_docstrings
|
||||
def test_doc(self):
|
||||
self.assertIsNotNone(bytearray.__doc__)
|
||||
|
||||
@@ -35,17 +35,6 @@ use crate::{
|
||||
use bstr::ByteSlice;
|
||||
use std::mem::size_of;
|
||||
|
||||
/// "bytearray(iterable_of_ints) -> bytearray\n\
|
||||
/// bytearray(string, encoding[, errors]) -> bytearray\n\
|
||||
/// bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\
|
||||
/// bytearray(int) -> bytes array of size given by the parameter initialized with null bytes\n\
|
||||
/// bytearray() -> empty bytes array\n\n\
|
||||
/// Construct a mutable bytearray object from:\n \
|
||||
/// - an iterable yielding integers in range(256)\n \
|
||||
/// - a text string encoded using the specified encoding\n \
|
||||
/// - a bytes or a buffer object\n \
|
||||
/// - any object implementing the buffer API.\n \
|
||||
/// - an integer";
|
||||
#[pyclass(module = false, name = "bytearray")]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct PyByteArray {
|
||||
|
||||
@@ -23,15 +23,6 @@ use bstr::ByteSlice;
|
||||
use std::mem::size_of;
|
||||
use std::ops::Deref;
|
||||
|
||||
/// "bytes(iterable_of_ints) -> bytes\n\
|
||||
/// bytes(string, encoding[, errors]) -> bytes\n\
|
||||
/// bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n\
|
||||
/// bytes(int) -> bytes object of size given by the parameter initialized with null bytes\n\
|
||||
/// bytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n \
|
||||
/// - an iterable yielding integers in range(256)\n \
|
||||
/// - a text string encoded using the specified encoding\n \
|
||||
/// - any object implementing the buffer API.\n \
|
||||
/// - an integer";
|
||||
#[pyclass(module = false, name = "bytes")]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct PyBytes {
|
||||
|
||||
Reference in New Issue
Block a user