Repository navigation
bpo-33872: Add list elements access complexity - #7728
Closed
andresdelfino wants to merge 5 commits into
Closed
andresdelfino wants to merge 5 commits into
andresdelfino wants to merge 5 commits into
Conversation
pablogsal
reviewed
Jun 15, 2018
| Lists are mutable sequences, typically used to store collections of | ||
| homogeneous items (where the precise degree of similarity will vary by | ||
| application). | ||
| application). List elements are accessed with a O(1). |
Member
There was a problem hiding this comment.
Suggestion: "List elements are accessed with O(1) time complexity" or "Accessing list elements has O(1) time complexity".
"List elements are accessed with a O(1)" sounds a bit off to me.
Contributor
Author
There was a problem hiding this comment.
IMHO, mentioning "time complexity" is definitely an improvement, I'll rephrase, thanks :)
We are not talking much about time complexity in other parts of the documentation. Change it to mimic the intention in the Glossary: avoid the confusion with linked lists.
vadmium
reviewed
Jun 17, 2018
| application). | ||
|
|
||
| Despite its name, lists are more akin to arrays in other languages than to | ||
| linked lists, since its elements are accessed with time complexity O(1). |
Member
There was a problem hiding this comment.
Use plural: “their name”, “their elements”, to agree with “lists are”
methane
reviewed
Jun 17, 2018
| homogeneous items (where the precise degree of similarity will vary by | ||
| application). | ||
|
|
||
| Despite their name, lists are more akin to arrays in other languages than to |
Member
There was a problem hiding this comment.
“despite their name” seems redundant.
“List” is datastructure independent, abstract word.
For example, C# uses IList and ArrayList for sequence (indexable). And LinkedList for linked list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue33872