PennyLaneAI / PennyLaneAI/catalyst
Documentation: Dictionary Ordering in Python
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Minor nitpick in our documentation for catalyst.pipeline which says
Note: As of Python 3.7, the CPython dictionary implementation orders dictionaries based on insertion order. However, for an API guarantee of dictionary order, collections.OrderedDict may also be used.
Actually as of Python 3.7 this is part of the Python standard, all compliant interpreters/compilers should preserve insertion order (as of 3.6 it was merely a CPython implementation detail). The official docs confirm this:
Dictionaries preserve insertion order. Note that updating a key does not affect the order. Keys added after deletion are inserted at the end.
Changed in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the note in the catalyst.pipeline documentation page linked in the issue and compare it with the official Python dictionary documentation. Update the note to accurately describe insertion-order guarantees from Python 3.7 and the earlier CPython-specific behavior, then verify the rendered wording and links.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100