Skip to content

Conversation

@Sklyvan
Copy link

@Sklyvan Sklyvan commented Dec 7, 2024

Simplifies the doctest for the from_key_val_list function to ensure compatibility across all Python 3.8+ versions, particularly addressing the inconsistency in how OrderedDict is represented in Python 3.8+ versus earlier versions.

Representation Differences:

Starting from Python 3.8, the string representation of an OrderedDict has changed slightly.
In earlier versions, OrderedDict objects were represented as:

OrderedDict([('key', 'val')])

In Python 3.8 and later, the OrderedDict has a more streamlined string representation, shown as:

OrderedDict({'key': 'val'})

The Python 3.8 and lower versions are already considered End of Life by Python, so there is no need to build the test around the older representation for OrderedDict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant