Skip to content

Conversation

@ArtemIsmagilov
Copy link
Contributor

  1. bytecode faster
  2. the code is easier
  3. speed finding elements in set O (1) (hashable elemets)

@tobixen
Copy link
Member

tobixen commented Jun 13, 2024

Seems good to use set rather than list, but I will have to review this one a bit more carefully.

@ArtemIsmagilov
Copy link
Contributor Author

look example

print(' sa asd asd\r\n \f \t dad as as , asd'.split())
['sa', 'asd', 'asd', 'dad', 'as', 'as', ',', 'asd']

@ArtemIsmagilov
Copy link
Contributor Author

This method is used only in 2 places to search for a string, set is suitable here. Map, filter and lambda are unnecessary here. For library users, nothing should change.

@tobixen tobixen merged commit 3031145 into python-caldav:master Jun 13, 2024
@ArtemIsmagilov ArtemIsmagilov deleted the refac-extract_auth_types branch June 13, 2024 18:32
mamogaaa pushed a commit to mamogaaa/caldav that referenced this pull request Jul 2, 2025
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.

2 participants