try_parse method
Leave feedback
On this page
Converts the string representation of a size to its class equivalent.
def try_parse(cls, s, size):
...
| Parameter | Type | Description |
|---|---|---|
| s | str |
A string containing a size to convert. |
| size | Size |
When the method returns, contains the instance of Size that is equivalent to the value specified in s if the conversion succeeded; otherwise, None. |
Returns: bool: True if s is converted successfully; otherwise, False.
- class
Size
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.