diff --git a/stdlib/src/collections/list.mojo b/stdlib/src/collections/list.mojo index f0bc3d0c6a..7e38d7e00b 100644 --- a/stdlib/src/collections/list.mojo +++ b/stdlib/src/collections/list.mojo @@ -469,11 +469,11 @@ struct List[T: CollectionElement, hint_trivial_type: Bool = False]( # Methods # ===-------------------------------------------------------------------===# - fn bytecount(self) -> Int: - """Gets the bytecount of the List. + fn byte_length(self) -> Int: + """Gets the byte length of the List. Returns: - The bytecount of the List. + The byte length of the List. """ return len(self) * sizeof[T]() diff --git a/stdlib/test/collections/test_list.mojo b/stdlib/test/collections/test_list.mojo index 56dab6510b..826a72a814 100644 --- a/stdlib/test/collections/test_list.mojo +++ b/stdlib/test/collections/test_list.mojo @@ -39,7 +39,7 @@ def test_list(): list.append(i) assert_equal(5, len(list)) - assert_equal(5 * sizeof[Int](), list.bytecount()) + assert_equal(5 * sizeof[Int](), list.byte_length()) assert_equal(0, list[0]) assert_equal(1, list[1]) assert_equal(2, list[2])