Skip to content

Non-actionable information about protocols #23

@chillenzer

Description

@chillenzer

The information in "Duck Typing"'s section "Protocols" doesn't really sound actionable to me. What am I supposed to learn from this? And how can I apply this afterwards? As far as I know, Python doesn't have anything to enforce or abide by protocols explicitly (except for static typecheckers of course), so all you can do is know about it and do my very best to abide by protocols. Could we have this more actionable in some form?

Relatedly, using the Iterator protocol suggests that it could be about figuring out if something is iterable, which is surprisingly challenging/easy (depending on your allowed toolbox) to do reliably due to the different ways of being iterable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions