Skip to content

Conversation

@Harikrishna-Srinivasan
Copy link

@Harikrishna-Srinivasan Harikrishna-Srinivasan commented Sep 23, 2024

Code Review Comments

  1. Global Variable Usage: The use of a global variable (_OTHER_ENDIAN) can lead to potential issues with state management and performance, as global lookups are generally slower than local variable accesses.

  2. Redundant Checks: The _other_endian function repeatedly checks the type of typ, which can be inefficient if this function is called multiple times.

  3. List Creation Overhead: In the __setattr__ method of _swapped_meta, creating a new list for fields can introduce unnecessary overhead, especially if no modifications are made.

@ghost
Copy link

ghost commented Sep 23, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Sep 23, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Contributor

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert all unrelated changes, see examples.

Please also keep just one news entry, that describe actual changes.

@skirpichev skirpichev removed their request for review September 24, 2024 04:09
@skirpichev
Copy link
Contributor

@Harikrishna-Srinivasan-1, please read https://devguide.python.org/ first. Then please address review comments.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants