Possible to distinguish between Sequence[str]/Iterable[str] and str?
If a function expects an iterable of strings, is it possible to forbid passing in a string, since strings are iterable? Seems like there are many cases where this would be an error, but I don't see an obvious way to check 't','h','i','s'.
Posted by jtatum on Jul 29, 2016, 11:15 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
github (Other)0 comments
Proposal to Reorganize the Moderation Team and Review Moderation Policies
github (Other)0 comments
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
github (Other)0 comments
proposal: container/...: generic collection types
github (Other)0 comments
Better Custom Endpoint BYOK
github (Other)0 comments
A concrete policy for backward compatibility until Godot 5.0
github (Other)0 comments
New MTP models not supported
github (Other)0 comments
Tracking: 429 / Capacity Issues
github (Other)0 comments
Possible to distinguish between Sequence[str]/Iterable[str] and str?
jtatumJul 29, 2016, 11:15 PM
If a function expects an iterable of strings, is it possible to forbid passing in a string, since strings are iterable? Seems like there are many cases where this would be an error, but I don't see an obvious way to check 't','h','i','s'.
Comments (0)
No comments yet. Start the discussion.