Skip to content

Commit

Permalink
Feat: Add len builtin function to URLSearchParams class (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
plusiv authored Nov 2, 2023
1 parent 5428da6 commit 853a49b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ada_url/ada_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ def __init__(self, params: str):
def size(self) -> int:
return lib.ada_search_params_size(self.paramsobj)

def __len__(self) -> int:
return self.size

def append(self, key: str, value: str):
key_bytes = key.encode('utf-8')
value_bytes = value.encode('utf-8')
Expand Down

0 comments on commit 853a49b

Please sign in to comment.