Skip to content

Make evolve 1st arg positional-only #1109

Closed
@ikonst

Description

@ikonst

It's arbitrary that the 1st argument is named inst and could conflict with a field.

Since PEP-570 positional-only arguments require Python 3.8 and next major version will be ≥ Python 3.7, we can do it the old-fashion way in the next breaking version (as this is an API change), i.e.

def evolve(*args, **changes):
  (inst,) = args
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions