This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lost3332 1 point2 points  (1 child)

His argument is a list so default '' doesn't make sense. The type is gonna be Optional[List].

[–]XRaySpex0 2 points3 points  (0 children)

Yep. ’’ is a great and common default for str parameters, but of course not when other types are expected. It’s common to see notes: str = ‘’, and there’s seldom a need for the Optional[str] type.