Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "def text_length" #2878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update "def text_length" #2878

wants to merge 1 commit into from

Conversation

BBC-Esq
Copy link

@BBC-Esq BBC-Esq commented Aug 6, 2024

This change enhances the text_length function to support a wider range of input types, particularly adding support for strings and lists of strings. Specifically...

Initially Supported:

  1. List of integers (List[int])
  2. List of lists of integers (List[List[int]])
  3. Dictionary (dict) - handled as a special case

Now Supports:

  1. String (str)
  2. List of strings (List[str])
  3. List of integers (List[int])
  4. List of lists of integers (List[List[int]])
  5. Dictionary (dict) - handled as before

The impetus for this pull was the fact that some programs provide a different format in order to work properly...And under the current implementation, it was breaking the program. I tried multiple times to fix this but was unsuccessful and this was the only solution that worked.

Please note, the commented out portions represent the deleted text so it's a little redundant with how Github does the comparison. Apologies for that; that's just want way it was modified in my script and the comments can obviously be deleted.

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