Skip to content

Add map() schema function #17

@kalekundert

Description

@kalekundert

It'd be nice to have some ability to recurse into nested data structures. I think I can already descend into dicts using cast(), but I need another function for containers. Some thoughts:

  • I should make an effort to maintain the container type.
  • map() might be a good name.
  • I might also rename cast() to apply() and defaults() to fill()...
  • I could do this using cast(), maybe. Non-keyword argument applied to all items in container (or values if container is dict). But the keyword arguments become limiting. Better to make a new function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions