Skip to content

str: strip, lstrip and rstrip raise TypeError on a non-str argument instead of a JavaScript error - #2995

Open
fgallaire wants to merge 1 commit into
brython-dev:masterfrom
fgallaire:str-strip-arg-type
Open

fgallaire wants to merge 1 commit into
brython-dev:masterfrom
fgallaire:str-strip-arg-type

Conversation

@fgallaire

Copy link
Copy Markdown
Contributor
>>> 'a'.strip(1)         
JavascriptError: chars is not iterable    # before                                                  
>>> 'a'.strip(1)                               
TypeError: strip arg must be None or str  # after                                               

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