marshmallow-code / marshmallow-code/marshmallow
Number fromhex()
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 738
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
In the [documentation ](https://marshmallow.readthedocs.io/en/stable/marshmallow.fields.html#marshmallow.fields.Number) for`Fields.Number` it mentions **fromhex()**. It is not clear to me how I can trigger that.
I would like to convert a hex-like string (e.g. 0x7AB) to a number and check that a non-hex-like string has not been given.
Essentially, is there a built-in way to deserialise/validate a hex-like string or would I need to use `Fields.Method`?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Fields.Number documentation linked in the issue and trace the fromhex() reference to the relevant Python behavior. Clarify whether Number deserializes hex-like strings and, if so, show how; otherwise state the supported approach for validating such input. Done means the documentation answers the question with a usable example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100